From 941639666d48165629c61fdb731b23c82050c11f Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 16 Mar 2021 21:44:30 +0100 Subject: [PATCH] Use auto publicPath deduction Change to "auto" as the publicPath to have webpack deduce the correct path at runtime. This fixes an issue with plugins being unable to be loaded due to trying to load bundles from the wrong path when the web interface is hosted under a proxied sub-path. --- packages/master/webpack.config.js | 2 +- plugins/global_chat/webpack.config.js | 2 +- plugins/research_sync/webpack.config.js | 2 +- plugins/statistics_exporter/webpack.config.js | 2 +- plugins/subspace_storage/webpack.config.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/master/webpack.config.js b/packages/master/webpack.config.js index 16223c8b..d7570127 100644 --- a/packages/master/webpack.config.js +++ b/packages/master/webpack.config.js @@ -12,7 +12,7 @@ module.exports = (env = {}) => merge(common(env), { contentBase: "./dist/web", }, output: { - publicPath: "/", + publicPath: "auto", filename: "bundle.js", path: path.resolve(__dirname, "dist", "web"), }, diff --git a/plugins/global_chat/webpack.config.js b/plugins/global_chat/webpack.config.js index ccb9b636..b1b77ec3 100644 --- a/plugins/global_chat/webpack.config.js +++ b/plugins/global_chat/webpack.config.js @@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), { context: __dirname, entry: "./web/index.jsx", output: { - publicPath: "/plugins/global_chat/", + publicPath: "auto", filename: "bundle.js", path: path.resolve(__dirname, "dist", "web"), }, diff --git a/plugins/research_sync/webpack.config.js b/plugins/research_sync/webpack.config.js index b34f7439..e41d52e5 100644 --- a/plugins/research_sync/webpack.config.js +++ b/plugins/research_sync/webpack.config.js @@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), { context: __dirname, entry: "./web/index.jsx", output: { - publicPath: "/plugins/research_sync/", + publicPath: "auto", filename: "bundle.js", path: path.resolve(__dirname, "dist", "web"), }, diff --git a/plugins/statistics_exporter/webpack.config.js b/plugins/statistics_exporter/webpack.config.js index a42b5c65..81f1a2ad 100644 --- a/plugins/statistics_exporter/webpack.config.js +++ b/plugins/statistics_exporter/webpack.config.js @@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), { context: __dirname, entry: "./web/index.jsx", output: { - publicPath: "/plugins/statistics_exporter/", + publicPath: "auto", filename: "bundle.js", path: path.resolve(__dirname, "dist", "web"), }, diff --git a/plugins/subspace_storage/webpack.config.js b/plugins/subspace_storage/webpack.config.js index 1de46598..8305920b 100644 --- a/plugins/subspace_storage/webpack.config.js +++ b/plugins/subspace_storage/webpack.config.js @@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), { context: __dirname, entry: "./web/index.jsx", output: { - publicPath: "/plugins/subspace_storage/", + publicPath: "auto", filename: "bundle.js", path: path.resolve(__dirname, "dist", "web"), },