hannoeru / vite-plugin-pages

File system based route generator for ⚡️Vite
MIT License
1.84k stars 127 forks source link

fix: change virtual module id to prefix with `virtual:` #468

Closed callqh closed 6 months ago

callqh commented 6 months ago

Description

Modify the name of the virtual module to conform to the specification of vite and rollup so that it can be easily used in other frameworks.

Additional context

If the name is not standardized, some frameworks will resolve it as an absolute path because the name does not have the virtual: identifier and starts with /.


What is the purpose of this pull request?

Before submitting the PR, please make sure you do the following

callqh commented 6 months ago

https://vitejs.dev/guide/api-plugin.html#virtual-modules-convention

hannoeru commented 6 months ago

Thx.