From e5da4f1a65dc4ea3862da028ae12cb69a012b1d1 Mon Sep 17 00:00:00 2001 From: Daniel Koch Date: Wed, 10 Jul 2019 13:44:10 +0200 Subject: [PATCH] fix(cli): upgrade clean-webpack-plugin and change plugin require statement --- cli/src/config-generator.ts | 2 +- webpage/package.json | 2 +- webpage/webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/config-generator.ts b/cli/src/config-generator.ts index fdbecb6..101a803 100644 --- a/cli/src/config-generator.ts +++ b/cli/src/config-generator.ts @@ -81,7 +81,7 @@ const webpackPluginImports: { [option in PluginName]: string | false } = { 'common-config-webpack-plugin': `const CommonConfigWebpackPlugin = require('common-config-webpack-plugin')`, 'asset-config-webpack-plugin': `const AssetConfigWebpackPlugin = require('asset-config-webpack-plugin')`, 'html-webpack-plugin': `const HtmlWebpackPlugin = require('html-webpack-plugin')`, - 'clean-webpack-plugin': `const CleanWebpackPlugin = require('clean-webpack-plugin').CleanWebpackPlugin`, + 'clean-webpack-plugin': `const { CleanWebpackPlugin } = require('clean-webpack-plugin').CleanWebpackPlugin`, 'webpack-dev-server': false, 'webpack-cli': false, }; diff --git a/webpage/package.json b/webpage/package.json index c668ca4..a1917fc 100644 --- a/webpage/package.json +++ b/webpage/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "@types/webpack-env": "1.13.6", - "clean-webpack-plugin": "2.0.1", + "clean-webpack-plugin": "3.0.0", "ts-config-webpack-plugin": "1.0.0", "deploy-gh-pages": "1.0.0", "html-webpack-plugin": "3.2.0", diff --git a/webpage/webpack.config.js b/webpage/webpack.config.js index ad06953..0ee4f52 100644 --- a/webpage/webpack.config.js +++ b/webpage/webpack.config.js @@ -1,8 +1,8 @@ -const CleanWebpackPlugin = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const TsConfigWebpackPlugin = require('ts-config-webpack-plugin'); const OfflinePlugin = require('offline-plugin'); const EmptyPlugin = { apply: () => {} }; +const { CleanWebpackPlugin } = require('clean-webpack-plugin'); module.exports = (_, { mode }) => ({ output: {