DEBUG_PROD=true yarn build && yarn startWhen I package my app, install it, and then un-asar the package...
$ yarn global add asar
$ asar extract /Applications/ElectronReact.app/Contents/Resources/app.asar /tmp/erb-0.17
$ ls -alh /tmp/erb-0.17/app/**/**.map
I see source maps are being distributed:

Sometimes these sourcemaps can get large... i.e. 17MB
They increase the size of the download. It seems that anybody building an Electron app would be uploading source maps to a bug reporting system at build time.
.map files are in the asar.
.map files should not be in the asar.
The electron-builder config should be updated or alternatively CleanWebpackPlugin should be used to delete sourcemaps at the beginning of a production build.
$ cd electron-react-boilerplate
$ yarn dev # then quit
$ yarn package # then install ./release/ElectronReact-0.17.0.dmg
$ yarn global add asar
$ asar extract /Applications/ElectronReact.app/Contents/Resources/app.asar /tmp/erb-0.17
$ ls -alh /tmp/erb-0.17/app/**/**.map
Increases app size. Testing on master. In my real world app source maps are 4MB of unnecessary space being distributed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
why is this closed?
In addition, you can view the source code through the map file, which is not safe.