-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (34 loc) · 901 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
const path = require('path');
const debug = process.env.NODE_ENV != "production";
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: debug ? 'source-map' : null,
entry: './client/src/start.js',
output: {
filename: 'bundle.js',
path: './client/dist/'
},
module: {
loaders: [
{
test: /\.js/,
exclude: /(node_modules|bower_components)/,
loader: "babel" // without .babelrc --> ?presets[]=es2015,presets[]=react,preset[]=stage-3"
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('css!autoprefixer?browsers=last 4 version!sass')
},
{
test: /\.html/,
loader: "file-loader?name=[name].[ext]"
}
]
},
resolve: {
root: path.resolve('./client/src')
},
plugins: [
new ExtractTextPlugin('style.css', { allChunks: true })
]
};