forked from RickWong/react-inline-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.client-watch.js
34 lines (27 loc) · 931 Bytes
/
webpack.client-watch.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
var webpack = require("webpack");
var config = require("./webpack.client.js");
config.cache = true;
config.debug = true;
config.devtool = "eval";
config.entry.WDS = "webpack-dev-server/client?http://localhost:8080";
config.entry.hot = "webpack/hot/only-dev-server";
config.module.postLoaders = [
{test: /\.js$/, loaders: ["react-hot"], exclude: /node_modules/}
];
config.output.publicPath = "http://localhost:8080/dist/";
config.output.hotUpdateMainFilename = "update/[hash]/update.json";
config.output.hotUpdateChunkFilename = "update/[hash]/[id].update.js";
config.plugins = [
new webpack.HotModuleReplacementPlugin()
];
config.devServer = {
publicPath: "http://localhost:8080/dist/",
contentBase: "./static",
hot: true,
inline: true,
quiet: true,
noInfo: true,
headers: {"Access-Control-Allow-Origin": "*"},
stats: {colors: true}
};
module.exports = config;