From 54382a764847d1540841d64bcb733ee4ea4ced69 Mon Sep 17 00:00:00 2001 From: Yves Lavoie Date: Fri, 29 Mar 2024 21:17:33 -0400 Subject: [PATCH] Fix 'webpack serve' (#8106) --- UI/webpack.config.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/UI/webpack.config.js b/UI/webpack.config.js index 4b45ce0d29..aa5301db48 100644 --- a/UI/webpack.config.js +++ b/UI/webpack.config.js @@ -216,7 +216,7 @@ if (TARGET !== "readme") { const UnusedWebpackPluginOptions = { // Source directories directories: [ - path.join(__dirname, "js-src/lsmb"), + path.join(__dirname, "js-src/lsmb"), path.join(__dirname, "src") ], // Exclude patterns @@ -495,23 +495,28 @@ if (TARGET !== "readme") { }, hot: true, host: "0.0.0.0", + liveReload: true, port: 9000, - proxy: { - "/*.pl": { + proxy: [ + { + context: ["/*.pl"], target: "http://proxy" }, - "/erp/api": { + { + context: ["/erp/api"], target: "http://proxy" }, - "/app/*.pl": { + { + context: ["/app/*.pl"], target: "http://proxy", pathRewrite: { "^/app": "" } }, - "/app/erp/api": { + { + context: ["/app/erp/api"], target: "http://proxy", pathRewrite: { "^/app": "" } } - }, + ], static: [ { directory: __dirname,