Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The old extract-loader Webpack plugin is no longer maintained and is the source of all our remaining dependency security warnings. Looking at its issue tracker, it seems like there are also a number of edge-cases where it does not work correctly with Webpack 5 that have been slowly piling up (we haven't hit those yet, but who knows when that might happen). This switches to the currently recommended by Webpack mini-css-extract-plugin.
The main difference here is that this outputs a single bundled CSS file (
<root>/bundle.css
) instead of converting the individual files by themselves. I think that’s probably OK.An alternative would be to have
postcss-loader
write the files out itself. That gets us something more like the old file structure, but feels like it’s cutting against the grain a bit. It also seems like sourcemaps get lost when I do that, although I’m sure that, with enough fiddling, I could figure out how to put them back. For future reference, that webpack config would look like: