Closed jackmac92 closed 3 years ago
Thanks for reporting this issue (which I just noticed)! Do you encounter this problem even with USERSCRIPTER_MODE
set to production
. Example command:
USERSCRIPTER_MODE=production npm run build
@SimonAlling sorry I missed this earlier, setting that env var does fix the problem!
Would it make sense to default to production mode?
@jackmac92: I don't know, but I do know that this has to be fixed somehow; I can easily imagine just how frustrating it would be to have to deal with eval
CSP errors when one just wanted to build a userscript. Definitely not acceptable.
Could you perhaps share a sample userscript that I can use to verify that I have found a fix?
EDIT: I created one myself; I believe it suffices!
@SimonAlling awesome! Happy to test it out if that would help verify
I have proposed a fix in #35. Please let me know if it solves the problem, @jackmac92.
I'm going to merge the fix and consider this resolved. Please reopen otherwise. :slightly_smiling_face:
I was running into CSP errors on github, realized there were some
eval
statements in the bundled code. For some reason settingdevtool: 'inline-source-map'
fixes that. https://github.com/webpack/webpack/issues/4899#issuecomment-609724897I'll send a PR if you'd like