-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
executable file
·58 lines (48 loc) · 1.14 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
var path = require('path');
module.exports = {
// webpack options
cache: true,
entry: ["./js/index.js"],
output: {
path: "dist/",
filename: "main.js",
sourceMapFilename: '[file].map',
publicPath: '/js/'
},
stats: {
// Configure the console output
colors: true,
modules: true,
reasons: true
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loaders: ['babel']
}
]
},
plugins: [
],
externals: {
//don't bundle the 'react' npm package with our bundle.js
//but get it from a global 'React' variable
//'react': 'React',
//'react/addons' : 'React',
'google/maps' : 'google.maps'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
// stats: false disables the stats output
progress: false, // Don't show progress
// Defaults to true
failOnError: false, // don't report error to grunt if webpack find errors
// Use this if webpack errors are tolerable and grunt should continue
watch: false, // use webpacks watcher
// You need to keep the grunt process alive
keepalive: false, // don't finish the grunt task
// Use this in combination with the watch option
}