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

Vite's HMR fails when a file has more than one glob import. #3496

Closed
brillout opened this issue May 20, 2021 · 1 comment · Fixed by #3497
Closed

Vite's HMR fails when a file has more than one glob import. #3496

brillout opened this issue May 20, 2021 · 1 comment · Fixed by #3497

Comments

@brillout
Copy link
Contributor

brillout commented May 20, 2021

The PR #3497 fixes this.

@brillout
Copy link
Contributor Author

The root problem is this:

server._globImporters[importerModule.file!] = {
module: importerModule,
base,
pattern
}
}
.

As you can see _globImporters can hold only one glob per file. Any additional glob will overwrite the previous one.

The linked PR merely changes _globImporters to hold an array of globs per file.

This leads to a bug in vite-plugin-ssr causing vikejs/vike#66.

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.

2 participants