forked from colorswall/CSS-file-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.config.js
41 lines (38 loc) · 1.09 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
const path = require('path');
const commonConfig = require('./webpack.common.config');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
<<<<<<< HEAD
const extractCSS = new ExtractTextPlugin('style.css');
=======
const extractCSS = new ExtractTextPlugin('css-file-icons.css');
>>>>>>> faeed8d5c228e750cdddfb04e969e33245e8e252
const output = {
path: path.resolve(__dirname, 'build'),
publicPath: 'http://localhost:3005/build/',
filename: 'bundle.js'
};
const conf = {
...commonConfig,
...{
output: output,
devtool: 'source-map',
module: {
loaders: [
...commonConfig.module.loaders, {
test: /\.s?css$/,
exclude: /(node_modules)/,
loader: extractCSS.extract('style', 'css?sourceMap!postcss?sourceMap!sass?sourceMap')
}
]
},
plugins: [
extractCSS
],
devServer: {
historyApiFallback: true,
contentBase: './src',
port: 3005
}
}
};
module.exports = conf;