build: speed up webpack build using HardSource for caching#57
build: speed up webpack build using HardSource for caching#57chrismwendt wants to merge 1 commit intomasterfrom
Conversation
|
This is awesome!
sass-import-once is there for a reason though - otherwise Sass imports don't work like TS imports where a module is only included once. Every file or library that imports the same file will actually bring in that file another time into the bundle, but every file or dependency should be able to e.g. declare a dependency on bootstrap without bringing Bootstrap multiple times. This is not just a size concern, as the order in which CSS is defined matters. |
FYI we used CSS-in-JS for components at some point but there were a lot of problems with it, so we switched to using Sass. I don't think this bug is compelling enough reason to switch everything back, but always open to discuss. |
|
Is there any other way to organize SASS imports? If not, we'll have to wait for HardSource to provide an answer to mzgoddard/hard-source-webpack-plugin#416 |
|
I don't know, I would not think so. I would recommend you post a comment on that thread saying that you identified this only happens with sass-import-once, because I don't see it mentioned in the thread. The build of the browser-extension is not very optimized. I think there are other ways we can speed it up we can also try. |
#57) * Log hover events only when tooltip is displayed (mimic logic from sourcegraph.com) * Prevent leaks

https://github.com/mzgoddard/hard-source-webpack-plugin
HardSource caches modules in
.cache/and cuts down the build time:Here's what the output looks like 👀:
Unfortunately, I ran into the same issue reported here☹️ mzgoddard/hard-source-webpack-plugin#416 and I avoided it by removing node-sass-import-once and dropping the
.cssextension on some SASS imports. What's left are some deprecation warnings that will be dropped soon sass/node-sass#2362 (comment) These deprecation warnings can be ignored 🙈: