mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
move webpackDevServerPort to webpack/vars
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
c2d1c574f6
commit
d355a8d16a
4 files changed
+8
-4
No files matched your search
@@ -7,7 +7,7 @@ import Webpack from "webpack";
|
||||
import WebpackDevServer from "webpack-dev-server";
|
||||
import { webpackLensRenderer } from "./renderer";
|
||||
import logger from "../src/common/logger";
|
||||
import { buildDir } from "./vars";
|
||||
import { buildDir, webpackDevServerPort } from "./vars";
|
||||
|
||||
/**
|
||||
* API docs:
|
||||
@@ -24,6 +24,7 @@ const server = new WebpackDevServer({
|
||||
},
|
||||
allowedHosts: "all",
|
||||
host: "localhost",
|
||||
port: webpackDevServerPort,
|
||||
static: buildDir, // aka `devServer.contentBase` in webpack@4
|
||||
hot: "only", // use HMR only without errors
|
||||
liveReload: false,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import assert from "assert";
|
||||
import path from "path";
|
||||
import packageInfo from "../package.json";
|
||||
|
||||
@@ -19,3 +20,6 @@ export const appName = isDevelopment
|
||||
export const htmlTemplate = path.resolve(rendererDir, "template.html");
|
||||
export const publicPath = "/build/";
|
||||
export const sassCommonVars = path.resolve(rendererDir, "components/vars.scss");
|
||||
export const webpackDevServerPort = Number(process.env.WEBPACK_DEV_SERVER_PORT) || 9191;
|
||||
|
||||
assert(Number.isInteger(webpackDevServerPort), "WEBPACK_DEV_SERVER_PORT environment variable must only be an integer");
|
||||
Reference in new issue
Block a user