mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 00:53:42 +00:00
36 lines
794 B
JavaScript
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'
|
|
|
|
};
|