-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
36 lines (33 loc) · 800 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
// Temporary hack for Ubuntu on Windows:
// interface enumeration fails with EINVAL, so return empty.
// See: https://github.com/Microsoft/BashOnWindows/issues/468
try {
require('os').networkInterfaces();
} catch (e) {
require('os').networkInterfaces = () => ({});
}
// -- Hack END
const path = require('path');
const APP_DIR = path.resolve(__dirname, 'src');
const BUILD_DIR = path.resolve(__dirname, 'build');
module.exports = {
entry: APP_DIR + '/index.js',
output: {
path: BUILD_DIR,
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
include: APP_DIR,
loader: 'babel-loader',
babelrc: true
},
{
test: /\.scss$/,
loaders: ["style-loader", "css-loader", "sass-loader"]
}
]
}
};