@@ -5,11 +5,12 @@ const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
55const CleanWebpackPlugin = require ( 'clean-webpack-plugin' ) ;
66
77module . exports = {
8+ mode : 'production' ,
89
910 context : `${ __dirname } /src/` ,
1011
1112 entry : {
12- ' phaser' : './phaser.js' ,
13+ phaser : './phaser.js' ,
1314 'phaser.min' : './phaser.js' ,
1415 'phaser-arcade-physics' : './phaser-arcade-physics.js' ,
1516 'phaser-arcade-physics.min' : './phaser-arcade-physics.js'
@@ -25,21 +26,22 @@ module.exports = {
2526
2627 module : {
2728 rules : [
28- {
29- test : [ / \. v e r t $ / , / \. f r a g $ / ] ,
30- use : 'raw-loader'
31- }
29+ {
30+ test : [ / \. v e r t $ / , / \. f r a g $ / ] ,
31+ use : 'raw-loader'
32+ }
3233 ]
3334 } ,
3435
35- plugins : [
36+ optimization : { minimize : false } ,
3637
38+ plugins : [
3739 new webpack . DefinePlugin ( {
38- ' CANVAS_RENDERER' : JSON . stringify ( true ) ,
39- ' WEBGL_RENDERER' : JSON . stringify ( true )
40+ CANVAS_RENDERER : JSON . stringify ( true ) ,
41+ WEBGL_RENDERER : JSON . stringify ( true )
4042 } ) ,
4143
42- new CleanWebpackPlugin ( [ 'dist' ] ) ,
44+ new CleanWebpackPlugin ( [ 'dist' ] ) ,
4345
4446 new UglifyJSPlugin ( {
4547 include : / \. m i n \. j s $ / ,
@@ -49,14 +51,10 @@ module.exports = {
4951 compress : true ,
5052 ie8 : false ,
5153 ecma : 5 ,
52- output : {
53- comments : false
54- } ,
54+ output : { comments : false } ,
5555 warnings : false
5656 } ,
57- warningsFilter : ( src ) => false
57+ warningsFilter : ( ) => false
5858 } )
59-
6059 ]
61-
6260} ;
0 commit comments