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

Creating or deleting an .env file does not restart the dev server #12127

Closed
7 tasks done
Rich-Harris opened this issue Feb 21, 2023 · 0 comments · Fixed by #12129
Closed
7 tasks done

Creating or deleting an .env file does not restart the dev server #12127

Rich-Harris opened this issue Feb 21, 2023 · 0 comments · Fixed by #12129

Comments

@Rich-Harris
Copy link
Contributor

Describe the bug

Editing an .env file causes the dev server to restart. But creating one, or deleting it, does not. In some cases this necessitates hacky workarounds like https://github.com/sveltejs/learn.svelte.dev/pull/207/files.

Reproduction

https://github.com/Rich-Harris/vite-env-reload

Steps to reproduce

Follow the instructions in the repro README

System Info

System:
    OS: macOS 12.6.3
    CPU: (10) arm64 Apple M1 Max
    Memory: 118.83 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 110.0.5481.100
    Chrome Canary: 112.0.5607.0
    Firefox: 110.0
    Safari: 15.6.1
  npmPackages:
    vite: ^4.1.3 => 4.1.3

Used Package Manager

pnpm

Logs

No response

Validations

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

Successfully merging a pull request may close this issue.

1 participant