-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
43 lines (42 loc) · 944 Bytes
/
webpack.config.js
File metadata and controls
43 lines (42 loc) · 944 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
33
34
35
36
37
38
39
40
41
42
43
const path = require("path")
const webpack = require("webpack")
module.exports = {
entry: [
"react-hot-loader/patch",
"webpack-dev-server/client?http://localhost:8080",
"webpack/hot/only-dev-server",
"./src/browser/index.js"
],
output: {
path: path.resolve(__dirname, "build", "assets"),
filename: "app.min.js",
publicPath: "/assets/"
},
module: {
rules: [
{
test: /\.js$/,
loader: "babel-loader"
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
resolve: {
alias: {
component: path.resolve(__dirname, "src", "component"),
actions: path.resolve(__dirname, "src", "actions"),
reducers: path.resolve(__dirname, "src", "reducers"),
store: path.resolve(__dirname, "src", "store")
}
},
devServer: {
host: "localhost",
port: 8080,
hot: true,
proxy: {
"**": "http://localhost:3000"
}
}
}