From ee4e7cec2a2729b8bc6610c3cc3ad3874f3a5f31 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Mon, 20 Nov 2023 10:58:14 +0100 Subject: [PATCH] Add vite plugin for sidecar --- packages/sidecar/package.json | 3 +++ packages/sidecar/src/vite-plugin.js | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 packages/sidecar/src/vite-plugin.js 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(); + }, + }; +}