-
Notifications
You must be signed in to change notification settings - Fork 15
/
webpack.config.js
44 lines (42 loc) · 1.21 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
var pjson = require('./package.json');
var webpack = require('webpack');
var path = require('path');
var uglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
//var Visualizer = require('webpack-visualizer-plugin');
module.exports = {
entry: './src/index.js',
output: {
path: './dist',
filename: pjson.name + '.js',
sourceMapFilename: pjson.name + ".js.map"
},
devtool: "#inline-source-map",
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
//plugins: ['transform-runtime'],
presets: ['es2015'],
plugins: ['transform-object-rest-spread']
}
},
{test: /\.(glsl|frag|vert)$/, loader: 'raw', exclude: /node_modules/},
{test: /\.(glsl|frag|vert)$/, loader: 'glslify', exclude: /node_modules/}
]
},
plugins: [
//new Visualizer(),
/* new uglifyJsPlugin({
minimize: true,
sourceMap: true,
output: {
comments: false
},
compressor: {
warnings: false
}
})*/
]
}