@codemonster-ru/vueforge-playground-vite-plugin
v1.0.0
Published
Vite plugin for VueForge playground virtual modules
Maintainers
Readme
VueForge Playground Vite Plugin
A Vite plugin for resolving VueForge playground virtual modules from local source files.
Coordinated release: @codemonster-ru/[email protected].
Requirements
- Node.js 18 or newer for the plugin itself. The selected Vite major may require a newer Node.js version.
- Vite
^6.0.0,^7.0.0, or^8.0.0.
Install
npm install --save-dev @codemonster-ru/vueforge-playground-vite-pluginpnpm add --save-dev @codemonster-ru/vueforge-playground-vite-pluginyarn add --dev @codemonster-ru/vueforge-playground-vite-pluginQuick start
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import { vueforgePlaygroundVirtualPlugin } from '@codemonster-ru/vueforge-playground-vite-plugin';
export default defineConfig({
plugins: [
vueforgePlaygroundVirtualPlugin({
entries: {
example: fileURLToPath(new URL('./src/examples/example.ts', import.meta.url)),
},
}),
],
});Consumer code can then import virtual:vueforge-playground/example. Entries support default,
namespace, and named export modes. The package is side-effect free, ESM-only, and does not ship
browser runtime code or CSS.
The plugin executes in Vite's Node process and is safe to use for both client and SSR builds. It does not need Vue at runtime; the files exposed through virtual modules define their own runtime dependencies.
Public option types use the VueForge* prefix.
Package-local documentation
See
src/index.ts
and
CHANGELOG.md.
Playground UI and runtime setup is documented in
@codemonster-ru/vueforge-playground.
