-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
33 lines (30 loc) · 809 Bytes
/
webpack.config.js
File metadata and controls
33 lines (30 loc) · 809 Bytes
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
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
entry: {
filename:'./src/js/app.jsx'
},
output: {
filename: './public/js/app.js'
},
module: {
loaders: [
{
test: /\.jsx$/,
loaders: ['react-hot', 'jsx', 'babel'],
exclude: /node_modules/
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('css!sass')
}
]
},
plugins: [
new ExtractTextPlugin('./public/css/style.css',{allChunks:true}),
new CleanWebpackPlugin(['./public'], {
exclude: ['index.html']
})
],
watch: true
};