feat: disable hard-coded sourcemap support via environment variable#395
feat: disable hard-coded sourcemap support via environment variable#395jimmed wants to merge 2 commits intoelectron-userland:masterfrom jimmed:feat(electron-webpack)/optional-source-map-support
Conversation
|
Also prevent .map file generation here in this case: https://github.com/electron-userland/electron-webpack/blob/master/packages/electron-webpack/src/main.ts#L171 ? (set |
|
It would be nice if also the lines about 'nodeModulePath' are allowed to be disabled with a variable like your. |
|
Seconding @boris47 . I think the hardcoded |
|
Sorry folks, I don't have any time to continue work on this PR; the suggestions are all valuable though, and I'm glad they're captured here. If anybody is keen to see this merged, feel free to fork and extend. |
|
@boris47 @geeofree when I remove the lines of code ... I get an error about the global variable not defined. I tried to modify the require() to an ES6 import command. Can you share more details of how you got around this issue? I am using electron-webpack (with webpack 5.x) and I also have "nodeIntegration disabled, contextIsolation and sandbox enabled" ... i'm looking for the tightest security |
In reference to #285, this allows users to disable the hard-coded insertion of a script tag that is inserted into the generated root HTML page, by passing setting the environment variable
ELECTRON_WEBPACK_DISABLE_SOURCE_MAP_SUPPORTto any non-empty value.