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

HMR does not works when work with unplugin-vue-router #147

Closed
liuwilliamBUPT opened this issue Feb 21, 2024 · 1 comment
Closed

HMR does not works when work with unplugin-vue-router #147

liuwilliamBUPT opened this issue Feb 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@liuwilliamBUPT
Copy link
Contributor

reproduces: vue-layout-demo

I find when use pagesDirs or layoutsDirs options, the hmr will fail.

After I checked the code, I find if one of the options set, canEnableClientLayout will return false.Then simple hmr will not be use.

At this line, a watcher will listen dirs without config.root path prepended. So when hmr start, this will no module match the file name, and the page will not refresh.

I think this line may be changed to

watcher.add(layoutDirs)

And I've tested it, it work for the reproduce.

@markthree
Copy link
Collaborator

duplicate of #142,Let's track #141

@markthree markthree self-assigned this Feb 22, 2024
@markthree markthree added the bug Something isn't working label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants