phaser/v3/webpack.dist.config.js

47 lines
974 B
JavaScript
Raw Normal View History

2017-07-31 10:48:34 +00:00
'use strict';
const webpack = require('webpack');
const WebpackShellPlugin = require('webpack-shell-plugin');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
context: `${__dirname}/src/`,
entry: {
phaser: './phaser.js',
'phaser.min': './phaser.js'
2017-07-31 10:48:34 +00:00
},
output: {
path: `${__dirname}/dist/`,
filename: '[name].js',
library: 'Phaser',
libraryTarget: 'umd',
umdNamedDefine: true
},
plugins: [
new UglifyJSPlugin({
include: /\.min\.js$/,
2017-07-31 10:48:34 +00:00
parallel: true,
sourceMap: true,
compress: true,
comments: false,
uglifyOptions: {
ie8: false,
ecma: 5,
warnings: false
},
warningsFilter: (src) => false
}),
new WebpackShellPlugin({
onBuildStart: 'node create-checksum.js'
})
]
};