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(server): watch correct env files #5520

Merged
merged 2 commits into from Nov 9, 2021
Merged

Conversation

Amorites
Copy link
Contributor

@Amorites Amorites commented Nov 3, 2021

According to the doc, env file names are:

.env                # loaded in all cases
.env.local          # loaded in all cases, ignored by git
.env.[mode]         # only loaded in specified mode
.env.[mode].local   # only loaded in specified mode, ignored by git

@Shinigami92
Copy link
Member

What is the problem here? I use Vite 2.6.13 and my .env.adsoul-test.local is correctly taken when I execute vite --mode adsoul-test 🤔

So please explain what is not working for you and maybe then we should add a test for it

@Amorites
Copy link
Contributor Author

Amorites commented Nov 3, 2021

What is the problem here? I use Vite 2.6.13 and my .env.adsoul-test.local is correctly taken when I execute vite --mode adsoul-test 🤔

So please explain what is not working for you and maybe then we should add a test for it

Modify .env will trigger a restart bug modify .env.adsoul-test.local won't

@Shinigami92 Shinigami92 added p3-minor-bug An edge case that only affects very specific usage (priority) feat: hmr labels Nov 3, 2021
Shinigami92
Shinigami92 previously approved these changes Nov 3, 2021
benmccann
benmccann previously approved these changes Nov 8, 2021
packages/vite/src/node/server/hmr.ts Outdated Show resolved Hide resolved
@Amorites Amorites dismissed stale reviews from benmccann and Shinigami92 via a110819 November 9, 2021 08:54
@patak-dev patak-dev merged commit 03b77bd into vitejs:main Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants