jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/391880 )
Change subject: Fix: allow clean plugin to delete build products
......................................................................
Fix: allow clean plugin to delete build products
The clean plugin by default is only permitted to remove files at or
under the level of the Webpack file. When the Webpack files were split
into subdirectories, this silently prevented the plugin from removing
build products. This patch enables the plugin to work above the Webpack
directories.
Change-Id: Ifdb43192d1f80899143c2d4c006f86109b0a5faf
---
M src/client/webpack.config.ts
M src/server/webpack.config.ts
2 files changed, 17 insertions(+), 4 deletions(-)
Approvals:
Jhernandez: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/client/webpack.config.ts b/src/client/webpack.config.ts
index c2bfcfc..6e978d6 100644
--- a/src/client/webpack.config.ts
+++ b/src/client/webpack.config.ts
@@ -1,8 +1,8 @@
import * as AssetsPlugin from "assets-webpack-plugin";
-import * as ExtractTextPlugin from "extract-text-webpack-plugin";
-import * as webpack from "webpack";
import * as CleanPlugin from "clean-webpack-plugin";
import * as CopyWebpackPlugin from "copy-webpack-plugin";
+import * as ExtractTextPlugin from "extract-text-webpack-plugin";
+import * as webpack from "webpack";
import {
DEV_TOOL,
EXTENSIONS,
@@ -189,7 +189,13 @@
// See also
//
https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31.
config.plugins = [
- new CleanPlugin([PATHS.public.output], { verbose: VERBOSE }),
+ new CleanPlugin([PATHS.public.output], {
+ verbose: VERBOSE,
+
+ // Enable cleaning to occur at the project root and not just at the
+ // server-specific Webpack source root.
+ allowExternal: true
+ }),
new webpack.IgnorePlugin(/domino/),
diff --git a/src/server/webpack.config.ts b/src/server/webpack.config.ts
index c2dfb5f..681436d 100644
--- a/src/server/webpack.config.ts
+++ b/src/server/webpack.config.ts
@@ -38,7 +38,14 @@
},
plugins: [
- new CleanPlugin([PATHS.server.output], { verbose: VERBOSE }),
+ new CleanPlugin([PATHS.server.output], {
+ verbose: VERBOSE,
+
+ // Enable cleaning to occur at the project root and not just at the
+ // server-specific Webpack source root.
+ allowExternal: true
+ }),
+
definePlugin
]
};
--
To view, visit https://gerrit.wikimedia.org/r/391880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdb43192d1f80899143c2d4c006f86109b0a5faf
Gerrit-PatchSet: 2
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: Sniedzielski <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits