Getting Started
Add the plugin to your withPlugins
call:
API
The plugin exposes multiple entrypoints, all of them accept normal values and factory wrappers as values to be included in the virtual modules.
inlineModule
inlineModule
allows you to define a module inline, returning the name of the defined module.
It receives the definition of the virtual module.
defineModule
defineModule
allows you to define a module inline with a given import name.
It receives the definition of the virtual module.
defineMiddleware
defineMiddleware
allows you to define an Astro middleware inline.