-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
57 lines (56 loc) · 1.5 KB
/
webpack.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = {
devServer: {
outputPath: path.join(__dirname, 'dist'),
port: 8080,
colors: false
},
devtool: "source-map",
entry: {
app: ['./src/app.ts']
},
module: {
rules: [
// {
// test: /\.json$/,
// include: path.join(__dirname, 'node_modules', 'pixi.js'),
// loader: 'json-loader',
// },
{
test: /\.ts$/,
loader: 'ts-loader'
},
{
enforce: 'pre',
test: /\.ts$/,
loader: 'tslint-loader'
},
// {
// enforce: "post",
// test: /\.js$/,
// loader: 'transform-loader?brfs',
// include: path.join(__dirname, 'node_modules', 'pixi.js'),
// },
{
enforce: 'pre',
test: /\.(js|tsx?)$/,
loader: "source-map-loader"
}
],
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
externals: {
// Use external version of React
"pixi.js": "PIXI"
},
plugins: [
new CopyWebpackPlugin([{ from: 'src/public' }])
],
resolve: {
extensions: ['.ts', ".js"]
}
}