Skip to content

Commit

Permalink
Webpack 4
Browse files Browse the repository at this point in the history
  • Loading branch information
nkholski committed May 19, 2018
1 parent 7ea67da commit bc38b40
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions webpack.demo.config.js
@@ -1,18 +1,14 @@
var path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var BrowserSyncPlugin = require('browser-sync-webpack-plugin')
var CopyWebpackPlugin = require('copy-webpack-plugin')

// Phaser webpack config
//var phaserModule = path.join(__dirname, '/node_modules/phaser/')
//var phaser = path.join(phaserModule, 'src/phaser.js')
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');

var definePlugin = new webpack.DefinePlugin({
__DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')),
WEBGL_RENDERER: true, // I did this to make webpack work, but I'm not really sure it should always be true
CANVAS_RENDERER: true // I did this to make webpack work, but I'm not really sure it should always be true
})
});

module.exports = {
mode: 'development',
Expand Down Expand Up @@ -70,15 +66,6 @@ module.exports = {
}
})
],
/*optimization: {
namedModules: true,
splitChunks: {
name: 'vendor',
filename: 'vendor.bundle.js'
},
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
concatenateModules: true //ModuleConcatenationPlugin
},*/
module: {
rules: [{
test: /\.js$/, // Check for all js files
Expand All @@ -90,7 +77,6 @@ module.exports = {
}
}]
},
// { test: /\.js$/, use: ['babel-loader'], include: path.join(__dirname, 'src') },
{
test: /phaser-split\.js$/,
use: ['expose-loader?Phaser']
Expand All @@ -101,17 +87,7 @@ module.exports = {
}
]
},
/*node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
},*/
/*resolve: {
alias: {
//'GridPhysics': GridPhysics,
}
},*/
performance: {
hints: false
hints: false // Ignore warnings about large bundles as it really don't apply to games
}
}
};

0 comments on commit bc38b40

Please sign in to comment.