Skip to content

Commit 71ed294

Browse files
committed
Adding new ignore option
1 parent 2d52632 commit 71ed294

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

packages/react-scripts/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Added experimental support for https://github.com/mzgoddard/hard-source-webpack-plugin/, enabled by `USE_HARD_SOURCE_WEBPACK_PLUGIN=true` environment variable
1010
- `web` and `ssr` subpaths for each build's output
1111
- Output build 'status files' (`.build-status`, one for web, one for SSR), which can be watched by a Node.js server to know when builds are in progress or completed.
12+
- Added `ignoreCssWarnings` config item to allow the ability to supress CSS ordering issues when its safe to allow mixed order when it has not effect on output. https://github.com/webpack-contrib/mini-css-extract-plugin#remove-order-warnings
1213

1314
## 7.0.5 - 2020-01-10
1415

packages/react-scripts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ npm start
3030
- `externals`: exposing the Webpack config to modify externals, see [docs](https://webpack.js.org/configuration/externals/).
3131
- `ssrExternals`: Similar to above, but for `ssr.js` only.
3232
- `cssModules`: Boolean, true by default.
33+
- `ignoreCssWarnings`: Boolean, false by default. Allows the ability to supress CSS ordering issues when its safe to allow mixed order when it has not effect on output, see [docs](https://github.com/webpack-contrib/mini-css-extract-plugin#remove-order-warnings). False by default
3334

3435
## Releasing a new version of `backpack-react-scripts`
3536

packages/react-scripts/config/webpack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const customModuleRegexes = bpkReactScriptsConfig.babelIncludePrefixes
5151

5252
const cssModulesEnabled = bpkReactScriptsConfig.cssModules !== false;
5353
const crossOriginLoading = bpkReactScriptsConfig.crossOriginLoading || false;
54+
const supressCssWarnings = bpkReactScriptsConfig.ignoreCssWarnings || false;
5455

5556
// Source maps are resource heavy and can cause out of memory issue for large source files.
5657
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
@@ -714,6 +715,7 @@ module.exports = function(webpackEnv) {
714715
// both options are optional
715716
filename: 'static/css/[name].[contenthash:8].css',
716717
chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
718+
ignoreOrder: supressCssWarnings,
717719
}),
718720
// Generate a manifest file which contains a mapping of all asset filenames
719721
// to their corresponding output file so that tools can pick it up without

packages/react-scripts/config/webpack.config.ssr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,7 @@ module.exports = function(webpackEnv) {
700700
// // filename: 'static/css/[name].[contenthash:8].css',
701701
// filename: 'ssr.css',
702702
// // chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
703+
// // ignoreOrder: true,
703704
// }),
704705
// Generate a manifest file which contains a mapping of all asset filenames
705706
// to their corresponding output file so that tools can pick it up without

packages/react-scripts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "backpack-react-scripts",
3-
"version": "7.0.5",
3+
"version": "7.1.0-alpha.5e6feadc",
44
"description": "Backpack configuration and scripts for Create React App.",
55
"repository": "Skyscanner/backpack-react-scripts",
66
"license": "MIT",
@@ -47,7 +47,7 @@
4747
"jest-pnp-resolver": "1.0.2",
4848
"jest-resolve": "23.6.0",
4949
"lodash": "^4.17.11",
50-
"mini-css-extract-plugin": "0.4.3",
50+
"mini-css-extract-plugin": "0.8.0",
5151
"mkdirp": "^1.0.3",
5252
"node-sass": "4.12.0",
5353
"optimize-css-assets-webpack-plugin": "5.0.1",

0 commit comments

Comments
 (0)