Merge pull request #7537 from backstage/dependabot/npm_and_yarn/mini-css-extract-plugin-2.4.2

build(deps): bump mini-css-extract-plugin from 1.4.1 to 2.4.2
This commit is contained in:
Fredrik Adelöw
2021-10-12 21:20:55 +02:00
committed by GitHub
4 changed files with 20 additions and 22 deletions
+1 -1
View File
@@ -85,7 +85,7 @@
"json-schema": "^0.3.0",
"jest-transform-yaml": "^0.1.1",
"lodash": "^4.17.21",
"mini-css-extract-plugin": "^1.4.1",
"mini-css-extract-plugin": "^2.4.2",
"node-libs-browser": "^2.2.1",
"ora": "^5.3.0",
"postcss": "^8.1.0",
+7 -3
View File
@@ -26,7 +26,7 @@ export const optimization = (
return {
minimize: !isDev,
// Only configure when parallel is explicitly overriden from the default
// Only configure when parallel is explicitly overridden from the default
...(!isParallelDefault(options.parallel)
? {
minimizer: [
@@ -45,11 +45,15 @@ export const optimization = (
// enough, if they're smaller they end up in the main
packages: {
chunks: 'initial',
test: /[\\/]node_modules[\\/]/,
test(module: any) {
return Boolean(
module?.resource?.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/),
);
},
name(module: any) {
// get the name. E.g. node_modules/packageName/not/this/part.js
// or node_modules/packageName
const packageName = module.context.match(
const packageName = module.resource.match(
/[\\/]node_modules[\\/](.*?)([\\/]|$)/,
)[1];