mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
Reduce prerender dynamic value warning false positives (#11745)
This commit is contained in:
parent
50c3ed238d
commit
89bab1e707
2 changed files with 6 additions and 1 deletions
5
.changeset/new-pillows-kick.md
Normal file
5
.changeset/new-pillows-kick.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Prints prerender dynamic value usage warning only if it's used
|
|
@ -176,8 +176,8 @@ export default function envVitePlugin({ settings, logger }: EnvPluginOptions): v
|
|||
// TODO: Remove in Astro 5
|
||||
let exportConstPrerenderStr: string | undefined;
|
||||
s.replace(exportConstPrerenderRe, (m, key) => {
|
||||
exportConstPrerenderStr = m;
|
||||
if (privateEnv[key] != null) {
|
||||
exportConstPrerenderStr = m;
|
||||
return `export const prerender = ${privateEnv[key]}`;
|
||||
} else {
|
||||
return m;
|
||||
|
|
Loading…
Reference in a new issue