diff --git a/packages/vite/src/index.ts b/packages/vite/src/index.ts index d6ea00ef475b..9ae0d34a467b 100644 --- a/packages/vite/src/index.ts +++ b/packages/vite/src/index.ts @@ -61,7 +61,9 @@ export default function redwoodPluginVite(): PluginOption[] { }) Object.entries(process.env).forEach(([envName, value]) => { - newHtml = newHtml.replaceAll(`%${envName}%`, value || '') + if (envName.startsWith('REDWOOD_ENV_')) { + newHtml = newHtml.replaceAll(`%${envName}%`, value || '') + } }) return newHtml