Created
March 22, 2024 16:58
-
-
Save jrcastro2/2acf91a91588713589f636f4258b0559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/invenio_assets/assets/build/webpack.config.js b/invenio_assets/assets/build/webpack.config.js | |
index 2dda428..b9e09db 100644 | |
--- a/invenio_assets/assets/build/webpack.config.js | |
+++ b/invenio_assets/assets/build/webpack.config.js | |
@@ -9,7 +9,6 @@ | |
*/ | |
const BundleTracker = require("webpack-bundle-tracker"); | |
-const { CleanWebpackPlugin } = require("clean-webpack-plugin"); | |
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); | |
const ESLintPlugin = require("eslint-webpack-plugin"); | |
const CopyWebpackPlugin = require("copy-webpack-plugin"); | |
@@ -60,6 +59,7 @@ var webpackConfig = { | |
filename: "js/[name].[chunkhash].js", | |
chunkFilename: "js/[id].[chunkhash].js", | |
publicPath: config.build.assetsURL, | |
+ clean: true, | |
}, | |
optimization: { | |
minimizer: [ | |
@@ -207,13 +207,6 @@ var webpackConfig = { | |
filename: "css/[name].[contenthash].css", | |
chunkFilename: "css/[name].[contenthash].css", | |
}), | |
- // Removes the dist folder before each run. | |
- new CleanWebpackPlugin({ | |
- dry: false, | |
- verbose: false, | |
- dangerouslyAllowCleanPatternsOutsideProject: true, | |
- cleanStaleWebpackAssets: process.env.NODE_ENV === "production", // keep stale assets in dev because of OS issues | |
- }), | |
// Copying relevant CSS files as TinyMCE tries to import css files from the dist/js folder of static files | |
new CopyWebpackPlugin({ | |
patterns: [ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment