-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.config.js
39 lines (38 loc) · 948 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 webpack = require("webpack")
var path = require("path")
var root = __dirname
var nib = require("nib")
module.exports = {
devtool: 'source-map',
entry: {
app: [
'webpack-hot-middleware/client',
'entry.js'
],
},
output: {
path: root,
filename: "bundle.js",
},
module: {
loaders: [
{ test: /\.jsx?$/, loader: "babel", query: { presets: ['es2015', 'react'], "plugins": ["syntax-object-rest-spread"] } },
{ test: /\.coffee$/, loader: "coffee" },
{ test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' },
{ test: /\.(svg|png|jpe?g|gif|ttf|woff2?|eot)$/, loader: 'url?limit=8182' }
]
},
stylus: {
use: [nib()]
},
resolve: {
root: root
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
})
]
}