-
Notifications
You must be signed in to change notification settings - Fork 64
/
webpack.config.js
65 lines (64 loc) · 1.4 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
58
59
60
61
62
63
64
65
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
context: path.join(__dirname, 'src'),
entry: './bootstrapper',
output: {
path: path.join(__dirname, 'public'),
filename: 'wowser-[hash].js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
resolveLoader: {
root: path.join(__dirname, 'node_modules')
},
module: {
loaders: [
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=100000'
},
{
test: /\.styl$/,
loader: 'style-loader!css-loader!stylus-loader?resolve url',
exclude: /node_modules/
},
{
test: /\.(frag|vert|glsl)$/,
loader: 'raw-loader!glslify-loader?transform[]=glslify-import',
exclude: /node_modules/
},
{
test: /\.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules|blizzardry/
},
{
test: /\.jsx?$/,
loader: 'eslint-loader',
exclude: /node_modules|blizzardry/
}
]
},
plugins: [
new HtmlWebpackPlugin({
hash: true,
inject: true,
template: 'index.html'
})
],
devServer: {
contentBase: path.join(__dirname, 'public'),
proxy: {
'/pipeline/*': {
target: 'http://localhost:3000',
secure: false
}
}
}
};