phaser/plugins/camera3d/webpack.config.js
Richard Davey b25ff9e065 Moved Camera3D to optional plugin
Also included build flag to allow it to be compiled into the standard lib if required (saves a bunch of KB in duplicated classes)
2018-08-23 15:30:21 +01:00

47 lines
1.1 KiB
JavaScript

'use strict';
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
mode: 'production',
context: `${__dirname}/src/`,
entry: {
camera3d: './Camera3DPlugin.js',
'camera3d.min': './Camera3DPlugin.js'
},
output: {
path: `${__dirname}/dist/`,
filename: '[name].js',
library: 'Camera3DPlugin',
libraryTarget: 'var'
},
performance: { hints: false },
optimization: {
minimizer: [
new UglifyJSPlugin({
include: /\.min\.js$/,
parallel: true,
sourceMap: false,
uglifyOptions: {
compress: true,
ie8: false,
ecma: 5,
output: {comments: false},
warnings: false
},
warningsFilter: () => false
})
]
},
plugins: [
new CleanWebpackPlugin([ 'dist' ])
]
};