summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2025-04-01 21:57:48 +0100
committerSam Light <samlight1994@gmail.com>2025-04-01 21:57:48 +0100
commit1114dab0adad310e932c4440c42760c9d1371174 (patch)
tree1425bd8717a101a91172fc1a791a4616fafb529a
parent8a1f90127a01463105979ce999011b30d8e7c875 (diff)
Added remove empty scripts plugin
-rw-r--r--index.js2
-rw-r--r--package-lock.json74
-rw-r--r--package.json1
3 files changed, 38 insertions, 39 deletions
diff --git a/index.js b/index.js
index f80489c..c825b20 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,6 @@
import * as path from 'path';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
+import RemoveEmptyScriptsPlugin from 'webpack-remove-empty-scripts';
import NotifierPlugin from 'webpack-notifier';
import ManifestPlugin from 'webpack-assets-manifest';
import StylelintPlugin from 'stylelint-webpack-plugin';
@@ -114,6 +115,7 @@ export const makeConfig = (env, argv, options) => {
new CleanWebpackPlugin({
cleanStaleWebpackAssets: !isWatch
}),
+ new RemoveEmptyScriptsPlugin(),
new MiniCssExtractPlugin({
filename: 'css/[name].[contenthash:8].css',
chunkFilename: '[id].[contenthash:8].css'
diff --git a/package-lock.json b/package-lock.json
index 0e61a81..6252ea8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,16 +1,15 @@
{
"name": "@lightscale/webpack-config",
- "version": "1.0.7",
+ "version": "1.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lightscale/webpack-config",
- "version": "1.0.7",
+ "version": "1.1.1",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.12.10",
- "@babel/eslint-parser": "^7.16.0",
"@babel/preset-env": "^7.12.11",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.0",
@@ -40,6 +39,7 @@
"webpack-assets-manifest": "^5.0.6",
"webpack-cli": "^6.0.0",
"webpack-notifier": "^1.12.0",
+ "webpack-remove-empty-scripts": "^1.0.4",
"webpackbar": "^7.0.0"
}
},
@@ -109,24 +109,6 @@
"url": "https://opencollective.com/babel"
}
},
- "node_modules/@babel/eslint-parser": {
- "version": "7.27.0",
- "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.27.0.tgz",
- "integrity": "sha512-dtnzmSjXfgL/HDgMcmsLSzyGbEosi4DrGWoCNfuI+W4IkVJw6izpTe7LtOdwAXnkDqw5yweboYCTkM2rQizCng==",
- "license": "MIT",
- "dependencies": {
- "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
- "eslint-visitor-keys": "^2.1.0",
- "semver": "^6.3.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || >=14.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.11.0",
- "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0"
- }
- },
"node_modules/@babel/generator": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz",
@@ -2913,15 +2895,6 @@
"buffer": "^6.0.3"
}
},
- "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": {
- "version": "5.1.1-v1",
- "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
- "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==",
- "license": "MIT",
- "dependencies": {
- "eslint-scope": "5.1.1"
- }
- },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -4856,15 +4829,6 @@
"node": ">=8.0.0"
}
},
- "node_modules/eslint-visitor-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
- "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/eslint-webpack-plugin": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-5.0.0.tgz",
@@ -9129,6 +9093,38 @@
"node": ">=8"
}
},
+ "node_modules/webpack-remove-empty-scripts": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/webpack-remove-empty-scripts/-/webpack-remove-empty-scripts-1.0.4.tgz",
+ "integrity": "sha512-W/Vd94oNXMsQam+W9G+aAzGgFlX1aItcJpkG3byuHGDaxyK3H17oD/b5RcqS/ZHzStIKepksdLDznejDhDUs+Q==",
+ "license": "ISC",
+ "dependencies": {
+ "ansis": "1.5.2"
+ },
+ "engines": {
+ "node": ">=12.14"
+ },
+ "funding": {
+ "type": "patreon",
+ "url": "https://patreon.com/biodiscus"
+ },
+ "peerDependencies": {
+ "webpack": ">=5.32.0"
+ }
+ },
+ "node_modules/webpack-remove-empty-scripts/node_modules/ansis": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-1.5.2.tgz",
+ "integrity": "sha512-T3vUABrcgSj/HXv27P+A/JxGk5b/ydx0JjN3lgjBTC2iZUFxQGjh43zCzLSbU4C1QTgmx9oaPeWNJFM+auI8qw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12.13"
+ },
+ "funding": {
+ "type": "patreon",
+ "url": "https://patreon.com/biodiscus"
+ }
+ },
"node_modules/webpack-sources": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
diff --git a/package.json b/package.json
index 9009dc1..6ba8605 100644
--- a/package.json
+++ b/package.json
@@ -44,6 +44,7 @@
"webpack-assets-manifest": "^5.0.6",
"webpack-cli": "^6.0.0",
"webpack-notifier": "^1.12.0",
+ "webpack-remove-empty-scripts": "^1.0.4",
"webpackbar": "^7.0.0"
}
}