mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 04:33:31 +00:00
47 lines
1.1 KiB
JavaScript
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: './FacebookInstantGamesPlugin.js',
|
|
'camera3d.min': './FacebookInstantGamesPlugin.js'
|
|
},
|
|
|
|
output: {
|
|
path: `${__dirname}/dist/`,
|
|
filename: '[name].js',
|
|
library: 'FacebookInstantGamesPlugin',
|
|
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' ])
|
|
]
|
|
};
|