mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
refactor(build): remove deprecated webpack uglify plugin
This commit is contained in:
parent
f3160e4cc6
commit
31ffbfe978
950
package-lock.json
generated
950
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,7 @@
|
|||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.56.2",
|
"rollup": "^2.56.2",
|
||||||
"rxjs": "^6.6.7",
|
"rxjs": "^6.6.7",
|
||||||
|
"terser-webpack-plugin": "^5.2.4",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^27.0.5",
|
||||||
"ts-node": "^10.2.1",
|
"ts-node": "^10.2.1",
|
||||||
"tslint": "~6.1.0",
|
"tslint": "~6.1.0",
|
||||||
@ -67,7 +68,6 @@
|
|||||||
"typedoc": "^0.22.4",
|
"typedoc": "^0.22.4",
|
||||||
"typescript": "4.1.6",
|
"typescript": "4.1.6",
|
||||||
"typescript-tslint-plugin": "^1.0.1",
|
"typescript-tslint-plugin": "^1.0.1",
|
||||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
||||||
"unminified-webpack-plugin": "^3.0.0",
|
"unminified-webpack-plugin": "^3.0.0",
|
||||||
"webpack": "^5.51.1",
|
"webpack": "^5.51.1",
|
||||||
"winston": "^3.3.3",
|
"winston": "^3.3.3",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { readJSONSync, writeFileSync } from 'fs-extra';
|
import { readJSONSync, writeFileSync } from 'fs-extra';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import * as uglifyJsPlugin from 'uglifyjs-webpack-plugin';
|
import * as TerserPlugin from 'terser-webpack-plugin';
|
||||||
import * as unminifiedPlugin from 'unminified-webpack-plugin';
|
import * as unminifiedPlugin from 'unminified-webpack-plugin';
|
||||||
import * as webpack from 'webpack';
|
import * as webpack from 'webpack';
|
||||||
|
|
||||||
@ -51,11 +51,12 @@ const webpackConfig: webpack.Configuration = {
|
|||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||||
}),
|
}),
|
||||||
new uglifyJsPlugin({
|
|
||||||
sourceMap: true,
|
|
||||||
}),
|
|
||||||
new unminifiedPlugin(),
|
new unminifiedPlugin(),
|
||||||
],
|
],
|
||||||
|
optimization: {
|
||||||
|
minimize: true,
|
||||||
|
minimizer: [new TerserPlugin()],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function getPluginImport(entry: InjectableClassEntry) {
|
function getPluginImport(entry: InjectableClassEntry) {
|
||||||
|
Loading…
Reference in New Issue
Block a user