electron-userland / electron-userland/electron-webpack
Disable minification (which is breaking code sometimes)
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
* **Version**: electron-webpack 2.8.2
* **Target**: MacOS 10.15.4
I am trying to inject a preload script with a **require** exposition so I can use Spectron with it as recommended [here](https://github.com/electron-userland/spectron#node-integration)
```
if (process.env.NODE_ENV === 'test') {
window.electronRequire = require
}
```
But when running electron-webpack, minification change the function name and the **require** exposition does not work anymore.
```
...
"test" === process.env.NODE_ENV
? ((window.electronRequire = t(6))
...
```
Could you please give us a way to disable minification ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.