Additional Codacy fixes

This commit is contained in:
Anders Roos 2022-11-15 14:54:00 +01:00
parent 741f315f14
commit 73f7e105e8
4 changed files with 33 additions and 34 deletions

View file

@ -1,5 +1,5 @@
import { defineConfig, loadEnv } from "vite"
import react from "@vitejs/plugin-react"
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
const htmlPlugin = (mode: string) => {
const env = loadEnv(mode, ".");
@ -8,7 +8,7 @@ const htmlPlugin = (mode: string) => {
name: "html-transform",
transformIndexHtml(html: string) {
return html.replace(/%(.*?)%/g, function (match, p1) {
return env[p1];
return env[String(p1)];
});
},
};