diff --git a/packages/sidecar/package.json b/packages/sidecar/package.json index 72eda09b..46a39ba7 100644 --- a/packages/sidecar/package.json +++ b/packages/sidecar/package.json @@ -19,6 +19,9 @@ ".": { "import": "./dist/main.js", "types": "./dist/main.d.ts" + }, + "./vite-plugin": { + "import": "./src/vite-plugin.js" } }, "dependencies": {}, diff --git a/packages/sidecar/src/vite-plugin.js b/packages/sidecar/src/vite-plugin.js new file mode 100644 index 00000000..c4e96e8d --- /dev/null +++ b/packages/sidecar/src/vite-plugin.js @@ -0,0 +1,11 @@ +const { setupSidecar } = await import('@spotlightjs/sidecar'); + +export default function spotlightSidecar() { + return { + name: 'spotlightjs-sidecar', + + configureServer() { + setupSidecar(); + }, + }; +}