This repository has been archived by the owner on Jun 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
PWADevServer
file extension white list is problematic
#32
Comments
@DrewML Agreed! I have an idea for what to do about it: instead of using patterns to blacklist, we should use a filter function that checks whether a filename is in the current set of assets Webpack emitted on the last run. This means hooking into the compiler, so we've gotta figure that out. |
That shouldn't be too hard. Let's try and tackle it tomorrow to unblock @jimbo |
zetlen
added a commit
that referenced
this issue
May 10, 2018
Modify PWADevServer to add the backend proxy in the `after()` block, not the `before()` block. This allows `webpack-dev-middleware` to handle any requests that it can handle, before the proxy can intercept them. This is simple, doesn't require any filtering or regex matching, and does exactly what the dev wants! Fixes #32.
zetlen
added a commit
that referenced
this issue
May 10, 2018
Modify PWADevServer to add the backend proxy in the `after()` block, not the `before()` block. This allows `webpack-dev-middleware` to handle any requests that it can handle, before the proxy can intercept them. This is simple, doesn't require any filtering or regex matching, and does exactly what the dev wants! Also, improve DevProxy tests, which were too implementation-bound. Fixes #32.
4 tasks
zetlen
added a commit
that referenced
this issue
May 11, 2018
* fix(DevProxy): put proxy after other middlewares Modify PWADevServer to add the backend proxy in the `after()` block, not the `before()` block. This allows `webpack-dev-middleware` to handle any requests that it can handle, before the proxy can intercept them. This is simple, doesn't require any filtering or regex matching, and does exactly what the dev wants! Also, improve DevProxy tests, which were too implementation-bound. Fixes #32. * chore(doc): explanatory comment on DevProxy in test
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
pwa-buildpack/src/WebpackTools/PWADevServer.js
Line 161 in f91f8aa
We'll need to find a way to not have a whitelist of extensions. Consumers of this module will surely load other file types, and it won't be reasonable to require someone pass in all file extensions in the webpack config.
This is currently causing a 404 in this PR when loading a
.jpg
withfile-loader
.The text was updated successfully, but these errors were encountered: