We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Add support environment variables import.meta.env.VITE_FOO in Vue templates.
import.meta.env.VITE_FOO
// text.vue <template> <p>{{ import.meta.env.VITE_FOO }}</p> <div v-if="import.meta.env.VITE_FOO"> content </div> </template>
Currently the code above raises the error:
[plugin:vite:vue] Error parsing JavaScript expression: import.meta may appear only with 'sourceType: "module"' (1:1)
Just support it 😉
No response
Related issues:
The text was updated successfully, but these errors were encountered:
This seems to be happening because sourceType: 'module' is not set here. https://github.com/vuejs/core/blob/fe77e2bddaa5930ad37a43fe8e6254ddb0f9c2d7/packages/compiler-core/src/transforms/transformExpression.ts#L250-L252
sourceType: 'module'
Sorry, something went wrong.
vuejs/rfcs#566
No branches or pull requests
Description
Add support environment variables
import.meta.env.VITE_FOO
in Vue templates.Currently the code above raises the error:
Suggested solution
Just support it 😉
Alternative
No response
Additional context
Related issues:
Validations
The text was updated successfully, but these errors were encountered: