mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Updated Spine webpack config to use Terser
This commit is contained in:
parent
ed497bb700
commit
368b37b916
3 changed files with 24 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const RemovePlugin = require('remove-files-webpack-plugin');
|
const RemovePlugin = require('remove-files-webpack-plugin');
|
||||||
|
|
||||||
|
@ -53,18 +53,19 @@ module.exports = {
|
||||||
|
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new UglifyJSPlugin({
|
new TerserPlugin({
|
||||||
include: /\.min\.js$/,
|
include: /\.min\.js$/,
|
||||||
parallel: true,
|
parallel: true,
|
||||||
sourceMap: false,
|
extractComments: false,
|
||||||
uglifyOptions: {
|
terserOptions: {
|
||||||
|
format: {
|
||||||
|
comments: false
|
||||||
|
},
|
||||||
compress: true,
|
compress: true,
|
||||||
ie8: false,
|
ie8: false,
|
||||||
ecma: 5,
|
ecma: 5,
|
||||||
output: {comments: false},
|
|
||||||
warnings: false
|
warnings: false
|
||||||
},
|
}
|
||||||
warningsFilter: () => false
|
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const RemovePlugin = require('remove-files-webpack-plugin');
|
const RemovePlugin = require('remove-files-webpack-plugin');
|
||||||
|
|
||||||
|
@ -53,18 +53,19 @@ module.exports = {
|
||||||
|
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new UglifyJSPlugin({
|
new TerserPlugin({
|
||||||
include: /\.min\.js$/,
|
include: /\.min\.js$/,
|
||||||
parallel: true,
|
parallel: true,
|
||||||
sourceMap: false,
|
extractComments: false,
|
||||||
uglifyOptions: {
|
terserOptions: {
|
||||||
|
format: {
|
||||||
|
comments: false
|
||||||
|
},
|
||||||
compress: true,
|
compress: true,
|
||||||
ie8: false,
|
ie8: false,
|
||||||
ecma: 5,
|
ecma: 5,
|
||||||
output: {comments: false},
|
|
||||||
warnings: false
|
warnings: false
|
||||||
},
|
}
|
||||||
warningsFilter: () => false
|
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const RemovePlugin = require('remove-files-webpack-plugin');
|
const RemovePlugin = require('remove-files-webpack-plugin');
|
||||||
|
|
||||||
|
@ -53,18 +53,19 @@ module.exports = {
|
||||||
|
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new UglifyJSPlugin({
|
new TerserPlugin({
|
||||||
include: /\.min\.js$/,
|
include: /\.min\.js$/,
|
||||||
parallel: true,
|
parallel: true,
|
||||||
sourceMap: false,
|
extractComments: false,
|
||||||
uglifyOptions: {
|
terserOptions: {
|
||||||
|
format: {
|
||||||
|
comments: false
|
||||||
|
},
|
||||||
compress: true,
|
compress: true,
|
||||||
ie8: false,
|
ie8: false,
|
||||||
ecma: 5,
|
ecma: 5,
|
||||||
output: {comments: false},
|
|
||||||
warnings: false
|
warnings: false
|
||||||
},
|
}
|
||||||
warningsFilter: () => false
|
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue