chore: bump deps & drop clean-webpack-plugin in favor of clean:true

This commit is contained in:
Igor Randjelovic
2021-03-09 18:45:28 +01:00
parent d2abd58174
commit 0353d68781
9 changed files with 43 additions and 180 deletions

View File

@ -14,7 +14,8 @@ exports[`angular configuration for android 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -188,15 +189,6 @@ exports[`angular configuration for android 1`] = `
] ]
}, },
plugins: [ plugins: [
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -295,7 +287,8 @@ exports[`angular configuration for ios 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -469,15 +462,6 @@ exports[`angular configuration for ios 1`] = `
] ]
}, },
plugins: [ plugins: [
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -14,7 +14,8 @@ exports[`base configuration for android 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -186,15 +187,6 @@ exports[`base configuration for android 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -283,7 +275,8 @@ exports[`base configuration for ios 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -455,15 +448,6 @@ exports[`base configuration for ios 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -14,7 +14,8 @@ exports[`javascript configuration for android 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -196,15 +197,6 @@ exports[`javascript configuration for android 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -304,7 +296,8 @@ exports[`javascript configuration for ios 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -486,15 +479,6 @@ exports[`javascript configuration for ios 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -14,7 +14,8 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -201,15 +202,6 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -311,7 +303,8 @@ exports[`react configuration > android > base config 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -487,15 +480,6 @@ exports[`react configuration > android > base config 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -586,7 +570,8 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -773,15 +758,6 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -884,7 +860,8 @@ exports[`react configuration > ios > base config 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -1060,15 +1037,6 @@ exports[`react configuration > ios > base config 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -14,7 +14,8 @@ exports[`svelte configuration for android 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -211,15 +212,6 @@ exports[`svelte configuration for android 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -308,7 +300,8 @@ exports[`svelte configuration for ios 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -505,15 +498,6 @@ exports[`svelte configuration for ios 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -14,7 +14,8 @@ exports[`typescript configuration for android 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -196,15 +197,6 @@ exports[`typescript configuration for android 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -304,7 +296,8 @@ exports[`typescript configuration for ios 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -486,15 +479,6 @@ exports[`typescript configuration for ios 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -14,7 +14,8 @@ exports[`vue configuration for android 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -218,15 +219,6 @@ exports[`vue configuration for android 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/android/app/src/main/assets/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {
@ -315,7 +307,8 @@ exports[`vue configuration for ios 1`] = `
pathinfo: false, pathinfo: false,
publicPath: '', publicPath: '',
libraryTarget: 'commonjs', libraryTarget: 'commonjs',
globalObject: 'global' globalObject: 'global',
clean: true
}, },
resolve: { resolve: {
symlinks: true, symlinks: true,
@ -519,15 +512,6 @@ exports[`vue configuration for ios 1`] = `
} }
} }
), ),
/* config.plugin('CleanWebpackPlugin') */
new CleanWebpackPlugin(
{
cleanOnceBeforeBuildPatterns: [
'__jest__/platforms/ios/jest/app/**/*'
],
verbose: false
}
),
/* config.plugin('PlatformSuffixPlugin') */ /* config.plugin('PlatformSuffixPlugin') */
new PlatformSuffixPlugin( new PlatformSuffixPlugin(
{ {

View File

@ -16,24 +16,23 @@
"prepack": "npm run build && cp -R src/stubs dist/stubs && chmod +x dist/bin/index.js" "prepack": "npm run build && cp -R src/stubs dist/stubs && chmod +x dist/bin/index.js"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.13.8", "@babel/core": "^7.13.10",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
"@types/sax": "^1.2.1", "@types/sax": "^1.2.1",
"babel-loader": "^8.2.1", "babel-loader": "^8.2.1",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"clean-webpack-plugin": "^3.0.0",
"cli-highlight": "^2.1.10", "cli-highlight": "^2.1.10",
"commander": "^7.1.0", "commander": "^7.1.0",
"copy-webpack-plugin": "^7.0.0", "copy-webpack-plugin": "^8.0.0",
"css": "^3.0.0", "css": "^3.0.0",
"css-loader": "^5.1.1", "css-loader": "^5.1.1",
"dotenv-webpack": "^6.0.2", "dotenv-webpack": "^7.0.1",
"fork-ts-checker-webpack-plugin": "^6.1.0", "fork-ts-checker-webpack-plugin": "^6.1.1",
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",
"micromatch": "^4.0.2", "micromatch": "^4.0.2",
"postcss": "^8.2.6", "postcss": "^8.2.7",
"postcss-import": "^14.0.0", "postcss-import": "^14.0.0",
"postcss-loader": "^5.0.0", "postcss-loader": "^5.1.0",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"react-refresh": "^0.9.0", "react-refresh": "^0.9.0",
"sass": "^1.32.8", "sass": "^1.32.8",
@ -44,7 +43,7 @@
"ts-dedent": "^2.0.0", "ts-dedent": "^2.0.0",
"ts-loader": "^8.0.17", "ts-loader": "^8.0.17",
"vue-loader": "^15.9.5", "vue-loader": "^15.9.5",
"webpack": "^5.24.2", "webpack": "^5.24.4",
"webpack-bundle-analyzer": "^4.4.0", "webpack-bundle-analyzer": "^4.4.0",
"webpack-chain": "^6.5.1", "webpack-chain": "^6.5.1",
"webpack-cli": "^4.5.0", "webpack-cli": "^4.5.0",
@ -64,8 +63,8 @@
"jest-matcher-utils": "^26.6.2", "jest-matcher-utils": "^26.6.2",
"memfs": "^3.2.0", "memfs": "^3.2.0",
"nativescript-vue-template-compiler": "^2.8.2", "nativescript-vue-template-compiler": "^2.8.2",
"ts-jest": "^26.5.2", "ts-jest": "^26.5.3",
"typescript": "^4.2.2", "typescript": "^4.2.3",
"unionfs": "^4.4.0" "unionfs": "^4.4.0"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -5,7 +5,6 @@ import { resolve } from 'path';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import FilterWarningsPlugin from 'webpack-filter-warnings-plugin'; import FilterWarningsPlugin from 'webpack-filter-warnings-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin';
// import { WatchStateLoggerPlugin } from '../plugins/WatchStateLoggerPlugin'; // import { WatchStateLoggerPlugin } from '../plugins/WatchStateLoggerPlugin';
@ -78,7 +77,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
.pathinfo(false) .pathinfo(false)
.publicPath('') .publicPath('')
.libraryTarget('commonjs') .libraryTarget('commonjs')
.globalObject('global'); .globalObject('global')
.set('clean', true);
// Set up Terser options // Set up Terser options
config.optimization.minimizer('TerserPlugin').use(TerserPlugin, [ config.optimization.minimizer('TerserPlugin').use(TerserPlugin, [
@ -233,14 +233,6 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
.use('sass-loader') .use('sass-loader')
.loader('sass-loader'); .loader('sass-loader');
// items to clean
config.plugin('CleanWebpackPlugin').use(CleanWebpackPlugin, [
{
cleanOnceBeforeBuildPatterns: [`${getAbsoluteDistPath()}/**/*`],
verbose: !!env.verbose,
},
]);
// config.plugin('NormalModuleReplacementPlugin').use(NormalModuleReplacementPlugin, [ // config.plugin('NormalModuleReplacementPlugin').use(NormalModuleReplacementPlugin, [
// /.*/, // /.*/,
// request => { // request => {