Parse error in import.meta.env assignment
#10067
|
A parse error occurred in the code where writing to https://stackblitz.com/edit/vitest-dev-vitest-wdp1vbyr?file=test%2Fbasic.test.ts,src%2Fenv.ts |
Answered by
AriPerkkio
Apr 7, 2026
Replies: 1 comment 1 reply
|
Can you change it to following? export function configEnv() {
Object.assign(import.meta.env, {__config__ : true});
return true
}If not, feel free to file bug report about this. It's related to how Vitest internally transforms |
1 reply
Answer selected by
yamachi4416
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you change it to following?
If not, feel free to file bug report about this. It's related to how Vitest internally transforms
import.meta.env.