Skip to content
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

Unable to use other import.meta.env variables #29

Open
titenis opened this issue Dec 15, 2022 · 1 comment
Open

Unable to use other import.meta.env variables #29

titenis opened this issue Dec 15, 2022 · 1 comment

Comments

@titenis
Copy link

titenis commented Dec 15, 2022

This plugin works fine with env vars defined in .env files, but it ignores all other env variables coming from vite like dev, prod, mode etc.
Basically there should be a possibility to use everything that is defined at import.meta.env. Now simple conditional tag is not working:

    <script type="text/javascript" vite-if="import.meta.env.dev">
const var = 'abc';
</script>
@lxs24sxl
Copy link
Owner

Okay, I'll take care of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants