-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
50 lines (47 loc) · 1.06 KB
/
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
45
46
47
48
49
50
'use strict';
var path = require('path');
var nodeModules = path.join(__dirname, '/node_modules');
module.exports = {
cache: true,
resolve: {
extensions: ['', '.jsx', '.scss', '.js', '.json']
},
context: __dirname,
entry: [
'./src'
],
output: {
path: './build',
filename: 'bundle.js',
publicPath: '/build/'
},
devServer: {
host: '0.0.0.0',
port: 8080,
inline: true
},
module: {
noParse: [
path.join(nodeModules, '/react/dist/*.js')
],
loaders: [
{
test: /(\.js|\.jsx)$/,
include: path.join(__dirname, 'src'),
loaders: [
'react-hot',
'babel'
]
},
{
test: /(\.scss|\.css)$/,
loaders: [
'style',
'css?importLoaders=1',
'autoprefixer',
'sass'
]
}
]
}
};