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

When dependencies of config file change, dev server doesn't restart as espect. #5780

Closed
7 tasks done
sanyuan0704 opened this issue Nov 21, 2021 · 1 comment · Fixed by #5779
Closed
7 tasks done

When dependencies of config file change, dev server doesn't restart as espect. #5780

sanyuan0704 opened this issue Nov 21, 2021 · 1 comment · Fixed by #5779

Comments

@sanyuan0704
Copy link
Contributor

Describe the bug

When i use js config file , i found when dependencies of config file change, dev server cannot restart.But the problem doesn't appear in ts config file.

Reproduction

You can reproduce easily, like this:

// config-dep.js
module.exports = {
   a: 1
}
// vite.config.js
const { a } = require('./config-dep');
module.exports = {
  define: {
     VITE_TEST: a
  }
}

Then you change the content of config-dep.js, the dev server cannot get the change.

System Info

System:
    OS: macOS 11.2
    CPU: (8) x64 Apple M1
    Memory: 30.39 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.1 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm
  Browsers:
    Chrome: 96.0.4664.55
    Safari: 14.0.3
  npmPackages:
    vite: workspace:* => 2.7.0-beta.8

Used Package Manager

yarn

Logs

No response

Validations

@sanyuan0704
Copy link
Contributor Author

I have commit the pr to solve the problem.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2021
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