mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Move port to common vars
Signed-off-by: DmitriyNoa <dmytro.zharkov@gmail.com>
This commit is contained in:
parent
90ddf21903
commit
9fe200560b
@ -135,3 +135,5 @@ export const appSemVer = new SemVer(packageInfo.version);
|
||||
export const docsUrl = "https://docs.k8slens.dev/main/" as string;
|
||||
|
||||
export const sentryDsn = packageInfo.config?.sentryDsn ?? "";
|
||||
|
||||
export const webpackDevServerPort: number = +process.env.WEBPACK_DEV_SERVER_PORT || 9191;
|
||||
|
||||
@ -8,7 +8,7 @@ import type { SupportedFileExtension } from "../router/router-content-types";
|
||||
import { contentTypes } from "../router/router-content-types";
|
||||
import logger from "../logger";
|
||||
import { routeInjectionToken } from "../router/router.injectable";
|
||||
import { appName, publicPath } from "../../common/vars";
|
||||
import { appName, publicPath, webpackDevServerPort } from "../../common/vars";
|
||||
import path from "path";
|
||||
import isDevelopmentInjectable from "../../common/vars/is-development.injectable";
|
||||
import httpProxy from "http-proxy";
|
||||
@ -74,7 +74,7 @@ const handleStaticFileInDevelopment =
|
||||
}
|
||||
|
||||
proxy.web(req, res, {
|
||||
target: "http://127.0.0.1:9191",
|
||||
target: `http://127.0.0.1:${webpackDevServerPort}`,
|
||||
});
|
||||
|
||||
return { proxy };
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import Webpack from "webpack";
|
||||
import WebpackDevServer from "webpack-dev-server";
|
||||
import { webpackLensRenderer } from "./webpack.renderer";
|
||||
import { buildDir } from "./src/common/vars";
|
||||
import { buildDir, webpackDevServerPort } from "./src/common/vars";
|
||||
import logger from "./src/common/logger";
|
||||
|
||||
/**
|
||||
@ -26,7 +26,7 @@ function createDevServer(): WebpackDevServer {
|
||||
},
|
||||
allowedHosts: "all",
|
||||
host: "localhost",
|
||||
port: 9191,
|
||||
port: webpackDevServerPort,
|
||||
static: buildDir, // aka `devServer.contentBase` in webpack@4
|
||||
hot: "only", // use HMR only without errors
|
||||
liveReload: false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user