mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-04 00:06:19 +08:00
refactor(build): remove deprecated webpack uglify plugin
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { readJSONSync, writeFileSync } from 'fs-extra';
|
||||
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 webpack from 'webpack';
|
||||
|
||||
@@ -51,11 +51,12 @@ const webpackConfig: webpack.Configuration = {
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
new uglifyJsPlugin({
|
||||
sourceMap: true,
|
||||
}),
|
||||
new unminifiedPlugin(),
|
||||
],
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin()],
|
||||
},
|
||||
};
|
||||
|
||||
function getPluginImport(entry: InjectableClassEntry) {
|
||||
|
||||
Reference in New Issue
Block a user