-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.config.js
39 lines (37 loc) · 909 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
var path = require('path')
var webpack = require('webpack')
// var htmlPlugin = require("html-webpack-plugin")
module.exports = {
entry: {
'app': [
path.join(__dirname, 'app', 'App.js')
],
'vendor': ['react', 'react-dom', 'mobx', 'mobx-react']
},
output: {
path: path.join(__dirname, '__this-path-will-never-use__'),
filename: 'bundle.js'
},
module: {
preLoaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'eslint'}
],
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'react-hot!babel'},
{ test: /\.scss$/, loader: 'style!css!sass' }
]
},
plugins:[
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.js' }),
new webpack.HotModuleReplacementPlugin()
],
resolve:{
alias: {
}
},
externals: {
'jquery': 'window.$'
},
devtool: 'inline-source-map'
}