-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
69 lines (61 loc) · 1.31 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
66
67
68
69
var path = require('path');
module.exports = {
entry: './src/main.js',
devtool: 'source-map',
target: 'web',
output: {
path: path.resolve(__dirname, "build"),
publicPath: "/build/",
filename: 'bundle.js'
},
node: {
fs: "empty"
},
module: {
loaders: [
{
test: /render[\/\\]shaders\.js$/,
loader: 'transform/cacheable',
query: "brfs"
},
{
test: /[\/\\]webworkify[\/\\]index.js\.js$/,
loader: 'worker'
},
{
test: /\.js$/,
include: path.resolve(__dirname, 'node_modules/mapbox-gl/js/render/painter/use_program.js'),
loader: 'babel-loader!transform/cacheable?brfs'
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.less$/,
loader: 'style-loader!css-loader!less-loader'
},
{
test: /\.html$/,
loader: 'file?name=[name].[ext]'
},
{
test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
loader: 'url-loader'
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=8192'
}
]
},
resolve: {
extensions: ['', '.js', '.scss'],
alias: {
webworkify: 'webworkify-webpack'
},
root: [
path.resolve(path.join(__dirname, 'src'))
]
}
};