forked from terry81811/c3-react
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
32 lines (29 loc) · 824 Bytes
/
webpack.config.js
File metadata and controls
32 lines (29 loc) · 824 Bytes
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
var env = process.env.WEBPACK_ENV || "index";
var entry;
if (env === "dev") {
entry = [
"webpack-dev-server/client?http://localhost:3002",
"webpack/hot/dev-server",
"./examples/index.jsx"
];
} else {
entry = [
"./examples/index.jsx"
];
}
var config = {
entry: entry,
output: {
path: "./build",
filename: "bundle.js"
},
module: {
loaders: [
{ test: /\.css$/, loader: "style-loader!css-loader" }, // use ! to chain loaders
{ test: /\.less$/, loader: "style-loader!css-loader!less-loader" }, // use ! to chain loaders
{ test: /\.(ttf|eot|png|jpg|woff2|woff|svg)($|\?)/, loader: "url-loader?limit=100000" },
{ test: /\.jsx?$/, exclude: /node_modules/, loaders: ["react-hot", "babel-loader?stage=0&optional=runtime"] },
]
}
};
module.exports = config;