-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.client.config.js
36 lines (31 loc) · 1004 Bytes
/
webpack.client.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var path = require('path');
module.exports = {
name: "Client",
entry: "./src/client/app.ts",
output: {
filename: "game.js",
path: __dirname + "/build"
},
devtool: "source-map",
resolve: {
extensions: [".ts", ".js", ".json"],
alias: {
"phaser": "phaser-ce",
pixi: path.join(__dirname, "node_modules/phaser-ce/build/custom/pixi.js"),
}
},
module: {
loaders: [
{enforce: "pre", test: /\.js$/, loader: "source-map-loader"},
{ test: /pixi\.js$/, loader: 'expose-loader?PIXI' },
{ test: /p2\.js$/, loader: 'expose-loader?p2' },
{ test: require.resolve("phaser-ce"), loader: 'expose-loader?Phaser' },
{ test: require.resolve("socket.io-client"), loader: 'expose-loader?io'},
{ test: /\.ts?$/, loader: "awesome-typescript-loader"}
]
},
externals: {
"react": "React",
"react-dom": "ReactDOM"
}
};