-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebpack.common.js
More file actions
33 lines (32 loc) · 1.01 KB
/
webpack.common.js
File metadata and controls
33 lines (32 loc) · 1.01 KB
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
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
app: path.resolve(__dirname, 'src/index.ts'),
},
resolve: {
extensions: ['.ts', '.js', '.json']
},
plugins: [
new webpack.DefinePlugin({
__DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')),
WEBGL_RENDERER: true, // I did this to make webpack work, but I'm not really sure it should always be true
CANVAS_RENDERER: true // I did this to make webpack work, but I'm not really sure it should always be true
}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: './src/index.html',
chunks: ['vendor', 'app'],
chunksSortMode: 'manual',
}),
],
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
}
]
},
};