-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
51 lines (50 loc) · 1.1 KB
/
webpack.dev.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
const merge = require('webpack-merge');
const common = require('./webpack.common.config');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = merge(common, {
output: {
path: __dirname,
publicPath: '/',
filename: './dist/bundle.js'
},
module: {
rules: [{
test: /\.woff(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}, {
test: /\.woff2(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}, {
test: /\.ttf(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}, {
test: /\.eot(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}]
},
resolve: {
extensions: ['.js', '.jsx', '.scss']
},
devServer: {
historyApiFallback: true,
contentBase: './'
},
plugins: [
new ExtractTextPlugin({
filename: './dist/css/style.css',
allChunks: true
})
]
});