forked from josephch405/ML-Playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
46 lines (41 loc) · 846 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
45
46
var webpack = require("webpack");
var path = require("path");
var BUILD_DIR = path.join(__dirname, "build");
var APP_DIR = path.join(__dirname, "src");
var config = {
entry: {main: APP_DIR + "/main.jsx"},
output: {
path: BUILD_DIR,
filename: "./js/[name].bundle.js",
publicPath: "build"
},
module: {
loaders: [{
test: /\.jsx?/,
include: APP_DIR,
loader: "babel-loader",
query: {
presets:["es2015", "react"]
}
}, {
test: /\.less$/,
include: APP_DIR,
loader: "style-loader!css-loader!less-loader"
},{ test : /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,
include: APP_DIR,
loader : "file-loader"
}, {
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: [
"url-loader"
]
}]
},
resolve: {
extensions: [".js", ".jsx", ".css"]
},
node: {
fs: "empty"
}
};
module.exports = config;