Update webpack.config.js

This commit is contained in:
Richard Davey 2023-10-12 15:19:55 +01:00
parent 03b97580a8
commit 353459a838

View file

@ -56,60 +56,5 @@ module.exports = [
],
devtool: 'source-map'
},
/*
{
experiments: {
outputModule: true,
},
mode: 'development',
context: `${__dirname}/../src/`,
entry: {
phaser: './phaser-esm.js'
},
devtool: 'source-map',
output: {
path: `${__dirname}/../build/`,
sourceMapFilename: 'phaser.esm.js.map',
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string
devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string
filename: 'phaser.esm.js',
library: {
type: 'module'
}
},
performance: { hints: false },
plugins: [
new webpack.DefinePlugin({
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof WEBGL_DEBUG": JSON.stringify(true),
"typeof EXPERIMENTAL": JSON.stringify(true),
"typeof PLUGIN_3D": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
"typeof FEATURE_SOUND": JSON.stringify(true)
}),
{
apply: (compiler) => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
exec('node scripts/copy-esm-to-examples-watch.js', (err, stdout, stderr) => {
if (stdout) process.stdout.write(stdout);
if (stderr) process.stderr.write(stderr);
});
});
}
}
],
devtool: 'source-map'
}
*/
];