Phaser 3 Webpack Project Template
import is also supported.
Node.js is required to install dependencies and run scripts via
||Install project dependencies|
||Build project and open web server running project|
||Builds code bundle with production settings (minification, uglification, etc..)|
After cloning the repo, run
npm install from your project directory. Then, you can start the local development
server by running
After starting the development server with
npm start, you can edit any files in the
and webpack will automatically recompile and reload your server (available at
want your project to support. The targeted browsers are set in the
.babelrc file and the default currently
targets all browsers with total usage over "0.25%" but excludes IE11 and Opera Mini.
"browsers": [ ">0.25%", "not ie 11", "not op_mini all" ]
If you want to customize your build, such as adding a new webpack loader or plugin (i.e. for loading CSS or fonts), you can
webpack/base.js file for cross-project changes, or you can modify and/or create
new configuration files and target them in specific npm tasks inside of `package.json'.
After you run the
npm run build command, your code will be built into a single bundle located at
dist/bundle.min.js along with any other assets you project depended.
If you put the contents of the
dist folder in a publicly-accessible location (say something like
you should be able to open
http://mycoolserver.com/index.html and play your game.