From a504e74f54d5f3bcb3abf6d4ac34c7e771e2ed6c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 1 Dec 2021 18:10:02 +0100 Subject: [PATCH] extract function for script tag url --- vite.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index d72dba6f..ebf659ec 100644 --- a/vite.config.js +++ b/vite.config.js @@ -32,7 +32,7 @@ export default { polyfillModulePreload: false, }, plugins: [ - // legacyBuild(path.join(__dirname, "src/platform/web/index.html?html-proxy&index=0.js"), { + // legacyBuild(scriptTagPath(path.join(__dirname, "src/platform/web/index.html"), 0), { // "./Platform": "./LegacyPlatform" // }, "hydrogen-legacy", [ // './legacy-polyfill', @@ -44,3 +44,7 @@ export default { "HYDROGEN_VERSION": JSON.stringify(version) } }; + +function scriptTagPath(htmlFile, index) { + return `${htmlFile}?html-proxy&index=${index}.js`; +}