[MediaWiki-commits] [Gerrit] marvin[master]: Fix: allow clean plugin to delete build products
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: NiedzielskiGerrit-Reviewer: Jhernandez Gerrit-Reviewer: Sniedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] marvin[master]: Fix: allow clean plugin to delete build products
Niedzielski has uploaded a new change for review. ( 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, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/80/391880/1 diff --git a/src/client/webpack.config.ts b/src/client/webpack.config.ts index 192e080..49117a7 100644 --- a/src/client/webpack.config.ts +++ b/src/client/webpack.config.ts @@ -1,7 +1,7 @@ import * as AssetsPlugin from "assets-webpack-plugin"; +import * as CleanPlugin from "clean-webpack-plugin"; import * as ExtractTextPlugin from "extract-text-webpack-plugin"; import * as webpack from "webpack"; -import * as CleanPlugin from "clean-webpack-plugin"; import { DEV_TOOL, EXTENSIONS, @@ -188,7 +188,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: newchange Gerrit-Change-Id: Ifdb43192d1f80899143c2d4c006f86109b0a5faf Gerrit-PatchSet: 1 Gerrit-Project: marvin Gerrit-Branch: master Gerrit-Owner: NiedzielskiGerrit-Reviewer: Sniedzielski ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits