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

[Feature] Custom URI scheme #173

Open
1 task
Tobbe opened this issue Dec 20, 2023 · 0 comments
Open
1 task

[Feature] Custom URI scheme #173

Tobbe opened this issue Dec 20, 2023 · 0 comments

Comments

@Tobbe
Copy link

Tobbe commented Dec 20, 2023

  • I'd be willing to implement this feature

Describe the user story

I'd like to namespace all my virtual modules under a separate URI scheme. To make it clear that they are virtual modules and not just regular packages.

Describe the solution you'd like

Something like virtual:myModule.
Used like import foo from 'virtual:myModule'

Describe the drawbacks of your solution

I guess the biggest drawback is extra complexity in the plugin source code.

Describe alternatives you've considered

I'm doing virtual-myModule for now. But that is still something a regular module could be called. So it's not exactly as clear as I'd want it to be.

Additional context

Heavily inspired by Vite's conventions: https://vitejs.dev/guide/api-plugin#virtual-modules-convention

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

No branches or pull requests

1 participant