phaser/v3/webpack.config.js

36 lines
794 B
JavaScript

'use strict';
const webpack = require('webpack');
const WebpackShellPlugin = require('webpack-shell-plugin');
module.exports = {
context: './src',
entry: {
phaser: './phaser.js'
},
output: {
path: './dist',
filename: '[name].js',
library: 'Phaser',
libraryTarget: 'umd',
sourceMapFilename: '[file].map',
devtoolModuleFilenameTemplate: "webpack:///[resource-path]", // string
devtoolFallbackModuleFilenameTemplate: "webpack:///[resource-path]?[hash]", // string
umdNamedDefine: true,
},
plugins: [
new WebpackShellPlugin({
onBuildStart: 'node create-checksum.js',
onBuildEnd: 'node copy-to-examples.js'
})
],
devtool: 'inline-source-map'
};