По запросу пользователя добавил в Vite плагине vite-plugin-html-injection возможность указывать, вставлять ли в
#oss #vite
index.html
тот или иной фрагмент кода в зависимости от режима билда (buildModes?: "dev" | "prod" | "both"
){
name: "Google analytics",
path: "./src/injections/ga.html",
type: "raw",
injectTo: "body",
buildModes: "prod",
},
#oss #vite
GitHub
GitHub - altrusl/vite-plugin-html-injection: Vite plugin for injecting html, js, css code snippets into index.html
Vite plugin for injecting html, js, css code snippets into index.html - altrusl/vite-plugin-html-injection
👍6