-
Notifications
You must be signed in to change notification settings - Fork 75
/
webpack.dev.js
45 lines (43 loc) · 1.09 KB
/
webpack.dev.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
'use strict'
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: ['webpack-dev-server/client?http://localhost:2570', 'webpack/hot/dev-server', './docs/index.js'],
output: {
path: './docs/build',
filename: 'bundle.js',
publicPath: 'http://localhost:2570/docs/build/',
},
module: {
loaders: [
{
exclude: /node_modules/,
test: /\.js$/,
loaders: ['react-hot-loader', 'babel?presets[]=react'],
}, {
test: /\.jsx$/,
exclude: /node_modules/,
loaders: ['react-hot-loader', 'babel'],
}, {
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
}, {
test: /\.md$/,
loaders: ['html-loader'],
},
],
},
resolve: {
alias: {
'reactcss': path.resolve(__dirname, './src/index.js'),
},
extensions: ['', '.js', '.jsx', '.cjsx'],
fallback: [path.resolve(__dirname, './modules')],
},
plugins: [
new webpack.HotModuleReplacementPlugin({ quiet: true }),
new webpack.NoErrorsPlugin(),
],
devtool: 'eval',
quiet: true,
}