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

fix(middleware): fix cache issue for import.meta.env in node_modules #17512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smeng9
Copy link
Contributor

@smeng9 smeng9 commented Jun 18, 2024

Closes #17505

Copy link

stackblitz bot commented Jun 18, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@smeng9
Copy link
Contributor Author

smeng9 commented Jun 19, 2024

We probably need to check if this PR will affect the performance of vite because it tries to perform the search of the string in all code returned.

We also need to check if import.meta.env is the only variable we should search for. It is possible there are other defined variables that should not be cached.

@ArnaudBarre
Copy link
Member

import.meta.env is Vite specific, I'm not sure we want it to be supported in node_modules

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

Successfully merging this pull request may close these issues.

If import.meta.env gets injected into files from node_modules deps, the file should not be cached in dev mode
2 participants