You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite offers a plugin construct where you can define "virtual modules". ( import packageName from 'virtual:{package-name}')
In short, when bundling you can refer to this "module" and inject code into the bundle.
This can be very useful for including build-time generated framework metadata for example.
Currently, when you try to compile a JSR package using this construct you get an error:
error: Unsupported scheme "virtual" for module "virtual:{package-name}". Supported schemes:
- "blob"
- "data"
- "file"
- "http"
- "https"
- "jsr"
- "npm"
at file:///home/runner/work/file.mts:3:27
Child process exited with: 1
ELIFECYCLE Command failed with exit code 1.
Error: Process completed with exit code 1.
I'm not sure if it's in JSR's interest to support this, because it seems to check whether your dependencies actually resolve.
(I tried replacing it with npm:virtual:{package-name} and got an error because of that.
But I figured I'd make an issue anyway so it's documented if JSR doesn't want to support it.
The text was updated successfully, but these errors were encountered:
Hi,
Vite offers a plugin construct where you can define "virtual modules". (
import packageName from 'virtual:{package-name}'
)In short, when bundling you can refer to this "module" and inject code into the bundle.
This can be very useful for including build-time generated framework metadata for example.
Currently, when you try to compile a JSR package using this construct you get an error:
I'm not sure if it's in JSR's interest to support this, because it seems to check whether your dependencies actually resolve.
(I tried replacing it with
npm:virtual:{package-name}
and got an error because of that.But I figured I'd make an issue anyway so it's documented if JSR doesn't want to support it.
The text was updated successfully, but these errors were encountered: