-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove legacy CSS hot reloader #35934
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Webpack Runtime (~43 bytes added 📈 [gzipped])
Webpack runtime for loading modules. It is included in the HTML page as an inline script. Is downloaded and parsed every time the app is loaded. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
filename, | ||
rtlEnabled: true, | ||
} ), | ||
new FilterWarningsPlugin( { |
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.
Since this is to suppress warnings coming from MiniCssExtractPluginWithRTL
, maybe we should also prefix it with
new FilterWarningsPlugin( { | |
! useStyleLoader && new FilterWarningsPlugin( { |
?
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.
Unless those warnings are maybe even gone after #35866? 🤔
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.
Yes, that's true, the FilterWarningsPlugin
should be guarded by useStyleLoader
, too. And also the WebpackRtlPlugin
. The whole plugin setup is completely different in dev and prod.
There are two issues with
Webpack CSS, why are you so hard? 🤦♂ |
28e65dd
to
6fb2e3a
Compare
6fb2e3a
to
95fc0d2
Compare
I gave up on making |
I already described the issues with |
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.
Nice cleanup. I tested booting the app with http and https and everything works well 👍
Broken in ESLint cleanup in #35934.
Broken in ESLint cleanup in #35934.
After #35866, all Calypso CSS styles are built by webpack and delivered as webpack chunks. This PR removes the legacy and custom CSS hot reload code.
There's some overlap with @sirreal's #35839 which also removes part of the legacy CSS code. After rebasing it on top of this one, it will only contain modifications to the Webpack Build Monitor and nothing else.
Update:
Originally this PR also used
style-loader
to support hot module reloading in dev mode, but that turned out to be a very tough nut to crack. Postponing that to another PR.