-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (43 loc) · 907 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
36
37
38
39
40
41
42
43
44
var Path = require('path');
var Webpack = require('webpack');
require('fs');
module.exports = {
devtool: 'source-map',
entry: Path.join(__dirname, 'src/react-sample-app.jsx'),
output: {
path: Path.join(__dirname, 'public'),
publicPath: Path.join('/'),
filename: 'react-sample-app.js',
},
module: {
loaders: [
{
test: /\.js(x?)$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.scss$/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{ loader: 'sass-loader' }
]
}
]
},
devServer: {
contentBase: Path.join(__dirname, 'public'),
publicPath: Path.join('/'),
compress: true,
port: 4200,
watchOptions: {
watch: true,
watchContentBase: true,
},
overlay: {
warnings: true,
errors: true
}
}
};