-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
49 lines (48 loc) · 950 Bytes
/
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
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: __dirname,
entry: {
bundle: './app/index.jsx',
vendor: [
'react',
'react-dom',
'react-redux',
'react-router',
'react-router-redux',
'redux',
'redux-saga',
'redux-storage',
'redux-storage-engine-localstorage',
'es6-promise',
'whatwg-fetch',
]
},
output: {
path: 'dist/',
filename: '[name].js',
sourceMapFilename: '[name].js.map',
publicPath: '/'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', minChunks: Infinity})
],
module: {
loaders: [{
test: /\.jsx?$/,
include: [ path.resolve(__dirname, 'app') ],
loader: 'babel-loader', // 'babel' is also a legal name to reference
query: {
plugins: ['transform-runtime']
}
}]
},
devtool: ['source-map'],
resolve: {
extensions: ['', '.js', '.jsx']
},
devServer: {
contentBase: './dist/',
port: 9966
},
};