From f5289ba571aff724e505d70628d8f76301a503db Mon Sep 17 00:00:00 2001 From: Midhun Suresh <midhunr@element.io> Date: Tue, 8 Feb 2022 16:04:23 +0530 Subject: [PATCH] Rename defined constant --- parent-vite.config.js | 2 +- src/parent.ts | 2 +- vite.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parent-vite.config.js b/parent-vite.config.js index bc6bcbf..1ca929f 100644 --- a/parent-vite.config.js +++ b/parent-vite.config.js @@ -15,6 +15,6 @@ module.exports = defineConfig({ assetsInlineLimit: 0, }, define: { - cssFileName: cssLink.replace(/assets\//, ""), + CSS_FILE_NAME: cssLink.replace(/assets\//, ""), } }); diff --git a/src/parent.ts b/src/parent.ts index 77d5b41..511ddeb 100644 --- a/src/parent.ts +++ b/src/parent.ts @@ -46,7 +46,7 @@ function renderStartButton() { function loadCSS() { const linkElement = document.createElement("link") as HTMLLinkElement; linkElement.rel = "stylesheet"; - const urlFixed = new URL("cssFileName", parentRootHost); + const urlFixed = new URL("CSS_FILE_NAME", parentRootHost); linkElement.href = urlFixed.href; document.head.appendChild(linkElement); } diff --git a/vite.config.js b/vite.config.js index b3b82b3..b7e2521 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,7 +6,7 @@ module.exports = defineConfig(({ command }) => { return { // dev specific config define: { - cssFileName: JSON.stringify("parent-style.css"), + CSS_FILE_NAME: JSON.stringify("parent-style.css"), }, }; } else { -- GitLab