diff --git a/README.md b/README.md index b503260..ec55f39 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# phaser3-project-template +# Phaser 3 Webpack Project Template + A Phaser 3 Project Template ### Requirements We need [Node.js](https://nodejs.org) to install and run scripts. - ## Install and run Run next commands in your terminal: @@ -14,3 +14,4 @@ Run next commands in your terminal: |---------|-------------| | `npm install` | Install dependencies and launch browser with examples.| | `npm start` | Launch browser to show the examples.
Press `Ctrl + c` to kill **http-server** process. | +======= diff --git a/package.json b/package.json index 22c636d..a5822bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser3-project-template", - "version": "1.0.0", + "version": "1.0.8", "description": "A Phaser 3 Project Template", "main": "src/index.js", "scripts": { @@ -19,8 +19,11 @@ }, "homepage": "https://github.com/photonstorm/phaser3-project-template#readme", "devDependencies": { - "live-server": "^1.2.0", - "phaser": "^3.0.0-beta.1", - "webpack": "^3.4.1" + "webpack-dev-server": "^2.11.0", + "webpack": "^3.4.1", + "raw-loader": "^0.5.1" + }, + "dependencies": { + "phaser": "^3.2.0" } } diff --git a/webpack.config.js b/webpack.config.js index 9a8fe84..a7fb271 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,10 +9,24 @@ module.exports = { output: { path: path.resolve(__dirname, 'build'), + publicPath: '/build/', filename: 'project.bundle.js' }, + module: { + rules: [ + { + test: [ /\.vert$/, /\.frag$/ ], + use: 'raw-loader' + } + ] + }, + plugins: [ + new webpack.DefinePlugin({ + 'CANVAS_RENDERER': JSON.stringify(true), + 'WEBGL_RENDERER': JSON.stringify(true) + }) ] };