Skip to content

Commit 396586b

Browse files
fix: align webpack output and dojoRoot with ECLWATCH_DIST_URL
Agent-Logs-Url: https://github.com/risk-hsy/HPCC-Platform/sessions/f6eda9f9-3693-47be-9fa0-354f20f7038c Co-authored-by: SmithG3_risk <227189191+SmithG3_risk@users.noreply.github.com>
1 parent e2b50fc commit 396586b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

esp/src/webpack.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ proxyItems.forEach(item => {
2121

2222
const distPublicPath = (process.env.ECLWATCH_DIST_URL || "/esp/files/dist/").replace(/\/?$/, "/");
2323
const distUrl = distPublicPath.replace(/\/$/, "");
24+
const distFolder = distUrl.split("/").filter(Boolean).pop() || "dist";
25+
const outputPath = path.resolve(__dirname, `build/${distFolder}`);
2426

2527
const plugins = [
2628
new DojoWebpackPlugin({
2729
loaderConfig: require("./eclwatch/dojoConfig"),
28-
environment: { dojoRoot: "build/dist", distUrl },
30+
environment: { dojoRoot: `build/${distFolder}`, distUrl },
2931
buildEnvironment: { dojoRoot: "node_modules" }, // used at build time
3032
locales: ["en", "bs", "es", "fr", "hr", "hu", "pt-br", "sr", "zh"]
3133
}),
@@ -73,7 +75,7 @@ module.exports = function (env) {
7375
},
7476
output: {
7577
filename: "[name].eclwatch.js",
76-
path: path.resolve(__dirname, "build/dist"),
78+
path: outputPath,
7779
publicPath: distPublicPath,
7880
pathinfo: true
7981
},
@@ -145,4 +147,4 @@ module.exports = function (env) {
145147
(warning) => typeof warning.message === "string" && warning.message.includes("Failed to parse source map")
146148
]
147149
};
148-
};
150+
};

0 commit comments

Comments
 (0)