Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: support environment variable expansion #145

Merged

Conversation

Esirei
Copy link
Contributor

@Esirei Esirei commented Oct 7, 2021

This fixes an issue where the usage of dotenv sets unexpanded VITE_* environment variables in the process.env which end up being prioritized here and are therefore skipped here.

Given the example .env below, usages of import.meta.env.VITE_APP_NAME will now properly output Laravel instead of ${APP_NAME}

APP_NAME=Laravel
VITE_APP_NAME=${APP_NAME}

@innocenzi innocenzi changed the title Fix environment variable expansion. fix: support environment variable expansion Oct 7, 2021
@innocenzi innocenzi merged commit e89882c into innocenzi:main Oct 7, 2021
@innocenzi
Copy link
Owner

Thanks!

@innocenzi
Copy link
Owner

I released laravel-vite@0.0.21 with that fix. 👍

@Esirei
Copy link
Contributor Author

Esirei commented Oct 7, 2021

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants