-
Notifications
You must be signed in to change notification settings - Fork 19
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
How to skip invariant in webpack? #23
Comments
benjamn
added a commit
that referenced
this issue
Dec 3, 2020
Horrifying, sure, but much better than using Function: https://mathiasbynens.be/notes/globalthis Fixes #23.
benjamn
added a commit
that referenced
this issue
Dec 4, 2020
"Horrifying," sure, but so much better than using Function, in terms of how many folks will complain it violates their Content Security Policy: https://mathiasbynens.be/notes/globalthis Fixes #23.
@eternalmatt Starting in |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I found this module attempting to violate my Content Security Policy after tracking it down in my webpack bundle line 1, column 554,074 as it were. After finding that actual column, then grepping my node_modules for
Function('stub'
, I am greeted with the lovely code comment here: https://github.com/apollographql/invariant-packages/blob/master/packages/ts-invariant/src/invariant.ts#L54-L57As I would very much like to not include "unsafe-eval" and also not post back csp-violations to my server, how can I disable this functionality in my production webpack build?
I build with Angular CLI --prod so the minified code looks like this:
The text was updated successfully, but these errors were encountered: