When using this with envsub, once the substitution runs, the env vars are replaced.
The pattern I have been using is envsub dist/index.html.template dist/index.html - i.e. using the index.html as a template.
It would be nice to document this pattern and add an option to output an index.html.template file
"scripts": {
"build": "tsc && vite build && cp dist/index.html dist/index.html.template",
"serve": "envsub dist/index.html.template dist/index.html && vite preview --host",
},
When using this with
envsub, once the substitution runs, the env vars are replaced.The pattern I have been using is
envsub dist/index.html.template dist/index.html- i.e. using the index.html as a template.It would be nice to document this pattern and add an option to output an
index.html.templatefile