-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import.meta error in vite 3.1.3 #10183
Comments
Similar issue in vue plugin - I can confirm - if I set version to 3.0.9, my app builds in production and development, HMR works, etc no issues. If I move the Vite dependency to 3.1.0, I have the problem noted in this discussion thread - but to reduce it down, something in the new code in 3.1.1 started injecting |
#10167 might be related, similiar |
I can confirm changing target to |
That works for me too, great! |
Yeah, it's happening by the same cause with #10167. |
Describe the bug
There appears to be a bug in vite 3.1.3: when using vite with react and typescript (using a package called
vite-plugin-ssr
) I get errors beginning with:[vite] warning: "import.meta" is not available in the configured target environment ("ES2017") and will be empty
If I change the version to
vite 3.0.9
, the error goes away.The issue is with the vite version rather than the
vite-plugin-ssr
package, as I understood it.Here is a reproduction: .
tsconfig has
"module": "ES2020"
and:Reproduction
https://stackblitz.com/edit/github-c4bkhn
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: