-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
CSP WebSocket.client.onmessage #3062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yep, limitation, we can't rewrite external code and we need new |
I guess that's why the CRA project has https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/webpackHotDevClient.js |
Anyway let's keep open, I think we will fix it, but not in near future, right now I want to focus on stable release, CSP is not high priority in dev mode |
When investigating logging dependens on the logging runtime in webpack, this in turn has a dependency on tapable causing the issue. (HookCodeFactory) When on the client it seems like we are not using tapable (as tapable returns undefined in the client it falls back to currentDefaultLogger) @alexander-akait would you consider a pull-request in dev server and webpack splitting out the default logger from logger/runtime to be consumed without tapable by the webpack-dev-server? |
@raix Ideally we should use built-in logger from webpack, it is full featured, maybe we should rewrite code on build-time, I need time to thinking about it |
Makes sense - on the short term there would not be a difference as we are currently using the currentDefaultLogger anyway (tapable logger is returning undefined - but yes, maybe some way to threeshake tapable out - or stub it out) |
I've added a draft pull-request as an idea for solving the issue - not a priority at the moment why it's marked draft #3065 |
Uh oh!
There was an error while loading. Please reload this page.
Code
// webpack.config.js
// additional code, remove if not needed.
Expected Behavior
No CSP issues as in previous versions
Actual Behavior
For Bugs; How can we reproduce the behavior?
I'll try to get time to make a reproduction repository, a simple webpack and dev server config should do it - then set csp rules eg. in meta tags for script-src.
If using
injectClient: true
in dev server config it is also be possible to inspect the main bundle thatwebpack-dev-server/client/transpiled-modules/log.js
is build usingnew Function(...
(what's triggering the policy)For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: