Skip to content

Commit

Permalink
STRWEB-110 ignore order of CSS imports
Browse files Browse the repository at this point in the history
Add `@folio/consortia-settings` to a platform build generates tens of
thousands of lines of warnings form mini-css-extract-plugin about its
inability to determine what order to assemble its CSS rules in because
different files have the imports in a different order.

It seems likely we don't have to worry about this since per-module CSS
will be scoped to that module by postcss, and shared CSS will just be in
stripes-components, but this could be riskier than I realize, and a
better approach may be to try to figure out what is happening in
`@folio/consortia-settings` that is different than every other module
we've added to the platform so far.

Refs STRWEB-110
  • Loading branch information
zburke committed Mar 14, 2024
1 parent e5da675 commit a2ca475
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change history for stripes-webpack

## 5.2.0

* Don't worry about the order of CSS imports across modules. Refs STRWEB-110.

## 5.1.0 IN PROGRESS

* Add an entry point for stripes-core's service worker. Refs STRWEB-99.
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.cli.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const buildConfig = (stripesConfig) => {
prodConfig.module.rules.push(esbuildLoaderRule(allModulePaths));

prodConfig.plugins.push(
new MiniCssExtractPlugin({ filename: 'style.[contenthash].css' })
new MiniCssExtractPlugin({ filename: 'style.[contenthash].css', ignoreOrder: true })
);

return prodConfig;
Expand Down

0 comments on commit a2ca475

Please sign in to comment.