mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 20:13:35 +00:00
1b77dc4fa4
This commit brings the following updates: - Removal of the following redundant or unused packages: - `json-loader`: Webpack 2 can handle JSON files by default; - `copy-webpack-plugin`: unused; - `webpack-dev-server`: unused. - Upgrade of the following packages to their latest versions: - `fs-extra`; - `webpack`: upgraded to the latest stable version; - `webpack-shell-plugin`. - Addition of the following packages: - `uuid`, in replacement of the deprecated `node-uuid`, with no changes to the public API. - `eslint`, with ESLint linting utility. - Addition of two runnable scripts to help development tasks: - `build`: An alias for running `webpack`. - `eslint`: Alias for running ESLint using the provided configuration in the project. - Fix the package entry point, so package consumers will be capable to use library in a future release. - Update `.npmignore`, so npm will include only the relevant package files. - Some clean-up and a few code fixes.
36 lines
818 B
JavaScript
36 lines
818 B
JavaScript
'use strict';
|
|
|
|
const webpack = require('webpack');
|
|
const WebpackShellPlugin = require('webpack-shell-plugin');
|
|
|
|
module.exports = {
|
|
|
|
context: `${__dirname}/src/`,
|
|
|
|
entry: {
|
|
phaser: './phaser.js'
|
|
},
|
|
|
|
output: {
|
|
path: `${__dirname}/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'
|
|
|
|
};
|