Created
February 20, 2017 05:12
-
-
Save hellos3b/db4ea9ad0544bd5fc9de7ff5f51470f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| // Phaser webpack config | |
| const phaserModule = path.join(__dirname, '/node_modules/phaser-ce/') | |
| const phaser = path.join(phaserModule, 'build/custom/phaser-split.js') | |
| const pixi = path.join(phaserModule, 'build/custom/pixi.js') | |
| const p2 = path.join(phaserModule, 'build/custom/p2.js') | |
| module.exports = { | |
| devtool: 'source-map', | |
| entry: __dirname + "/src/js/init.js", | |
| output: { | |
| path: __dirname + "/dist", | |
| filename: "game.js", | |
| publicPath: "/dist/" | |
| }, | |
| module: { | |
| loaders: [{ | |
| test: /\.js?$/, | |
| exclude: /node_modules/, | |
| loader: 'babel-loader', | |
| query: { | |
| presets: ['es2015'] | |
| } | |
| }, | |
| { test: /pixi\.js/, loader: 'expose?PIXI' }, | |
| { test: /phaser-split\.js$/, loader: 'expose?Phaser' }, | |
| { test: /p2\.js/, loader: 'expose?p2' } | |
| ] | |
| }, | |
| resolve: { | |
| root: path.resolve('./src/js'), | |
| extensions: ['', '.js'], | |
| alias: { | |
| 'phaser': phaser, | |
| 'pixi': pixi, | |
| 'p2': p2 | |
| } | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment