2
0
Fork 0
mirror of https://github.com/photonstorm/phaser synced 2024-12-18 17:16:03 +00:00
phaser/v3/webpack.config.js

37 lines
794 B
JavaScript
Raw Normal View History

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