generated from serokell/metatemplates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dev.js
34 lines (29 loc) · 988 Bytes
/
webpack.dev.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
// SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { merge } = require("webpack-merge");
// eslint-disable-next-line @typescript-eslint/no-var-requires
const common = require("./webpack.common.js");
module.exports = merge(common, {
mode: "development",
// devtool from here https://github.com/TypeStrong/ts-loader
devtool: "inline-source-map",
devServer: {
contentBase: "./dist",
host: "0.0.0.0",
port: 9090,
hot: true,
// To fallback on index.html when page not found (needed for client side routing).
historyApiFallback: true,
// Redirect api requests to the backend
proxy: {
'/api': {
target: 'http://localhost:9000',
pathRewrite: { '^/api': '' },
},
},
// Uncomment in case of some troubles to inspect whether dev server generates bundles
// writeToDisk: true,
}
});