Skip to content
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

[plugin-webpack] Webpack plugin should use eval source maps in development to significantly speed up builds #2153

Closed
3 tasks done
lostfictions opened this issue Feb 7, 2021 · 1 comment

Comments

@lostfictions
Copy link

lostfictions commented Feb 7, 2021

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Hey there, if I'm not mistaken it seems @electron-forge/plugin-webpack has a suboptimal devtools configuration for development:

https://github.com/electron-userland/electron-forge/blob/90f122c2f6000a1cd10f71dd8d4edc9e483c99cd/packages/plugin/webpack/src/WebpackConfig.ts#L144

https://github.com/electron-userland/electron-forge/blob/90f122c2f6000a1cd10f71dd8d4edc9e483c99cd/packages/plugin/webpack/src/WebpackConfig.ts#L216

In my experience (and per webpack documentation), something like eval-cheap-module-source-map might be significantly faster in development. (I'm also not certain why inline-source-map would be used for the renderer process, even in production.)

Proposed Solution

Switch between eval-cheap-module-source-map (or eval-source-map if slower builds but column-accurate source maps are preferable) and source-map depending on whether webpack is bundling for development or for production.

Happy to submit a PR for this, but just wanted to check in that there's no caveat to Electron that I'm missing that justifies the current approach!

@lostfictions lostfictions changed the title [plugin-webpack] Webpack plugin should use eval source maps in developmenet [plugin-webpack] Webpack plugin should use eval source maps in development to significantly speed up builds Feb 7, 2021
@malept
Copy link
Member

malept commented Jun 1, 2021

This was done in #2225

@malept malept closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants