From 00e2074f882b1c5ff324888345f67120e1ba833b Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 7 May 2024 11:31:39 +0200 Subject: [PATCH] only import webpack-dev-server in dev mode --- scripts/server-frontend-dev.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/server-frontend-dev.js b/scripts/server-frontend-dev.js index e7dc5a1..496672f 100644 --- a/scripts/server-frontend-dev.js +++ b/scripts/server-frontend-dev.js @@ -1,5 +1,4 @@ import webpack from "webpack"; -import WebpackDevServer from "webpack-dev-server"; import config from "../config/webpack.dev.js"; const devServerConfig = { @@ -15,6 +14,7 @@ const devServerConfig = { }; export default async function startFrontendDevServer(port, resolve) { + let WebpackDevServer = (await import("webpack-dev-server")).WebpackDevServer; resolve(1); await new WebpackDevServer(webpack(config), devServerConfig).start(port, (err) => { if (err) {