Merged
Conversation
bebraw
approved these changes
Apr 8, 2019
matheus1lva
reviewed
Apr 8, 2019
matheus1lva
approved these changes
Apr 8, 2019
Owner
Author
|
I was able to confirm that koa-static doesn't allow specifying individual files. Works on a directory-level basis only. I'm not sure that's a blocker, but something to keep in mind moving forward. |
smashercosmo
pushed a commit
to smashercosmo/webpack-plugin-serve
that referenced
this pull request
Jul 23, 2019
* feat: static option glob support * test: fix test paths for local and CI * docs: add clarity, link to recipe to static option * chore: update test snapshot file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains:
Breaking Changes?
Please Describe Your Changes
This PR adds functionality to the
staticoption whereby it will useglobbyto derive a list of files to serve as static. @ndelangen had asked if this was possible, in order to run multiple instances of WPS in separate processes off of the same directory. Using globs, users can get very specific about which files/directories they want served.This still needs vetting, as I believe that
koa-staticwill only serve files based on a directory, rather than the file path itself, but that needs verification. Note that it is next to impossible to get the koa maintainers to add to existing core plugins/middleware. If it holds as not possible to specify files, we'll have to fork and provide that.