mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-23 10:30:12 +01:00
Additional Codacy fixes
This commit is contained in:
parent
741f315f14
commit
73f7e105e8
4 changed files with 33 additions and 34 deletions
|
|
@ -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)];
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue