-
Notifications
You must be signed in to change notification settings - Fork 46
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
speeding up WebPack builds by adding hard-source-webpack-plugin #914
Conversation
…ebpack-plugin Creates a cache, so speed increases is only seen after subsequent compiles.
⚡ PR built on Travis and deployed a now preview here:
|
@EvanLovely nice!! I know I’ve tested this plugin out a couple times with somewhat mixed results... I’d be super curious about what the recompile times are like when re-saving any Sass in Here’s hoping! 🤞 |
@EvanLovely so with some updates I had to figure out locally (Webpack recompile issues related to webpack/webpack#8052) - I was able to get this working with some really awesome results! Initial Webpack compile time via |
What did you need to do to get it working? |
@EvanLovely the initial build seems to always be fine... the problems seem to be from subsequent file changes and/or restarting the build with the cache is getting used. I initially had to change the webpack version to So far so good now... but I'm holding off merging this in till I'm positive there aren't any more weird bugs that pop up locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the idea @EvanLovely but closing this out in lieu of #923 so we have this added via a feature toggle. This'll help a ton with local front-end builds!
I came across the
hard-source-webpack-plugin
and saw fantastic speed results with zero config, so I knew Bolt needed to have it! Just dropped it in and saw Bolt's WebPack compile step in PL go from 51.9s => 5.4s!! It's all about caching, so you'll only see it on subsequent compiles. Also: I have not tested; didn't crack open PL or anything, so please take a look. A 10x speed increase is pretty incredible; I really hope that this "just works" for you!