From 4973aa9cb6b7ccf4f2ee15495870710fb03ec883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gr=C3=B8ngaard?= Date: Thu, 23 May 2024 09:24:13 +0200 Subject: [PATCH] fix: distribute VisualEditing component (#172) --- packages/sanity-astro/package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/sanity-astro/package.json b/packages/sanity-astro/package.json index 3f5a67bd..29ebb1ae 100644 --- a/packages/sanity-astro/package.json +++ b/packages/sanity-astro/package.json @@ -5,13 +5,15 @@ "scripts": { "clean": "rimraf dist && rimraf .turbo && rimraf node_modules", "dev": "vite build --watch", - "build": "rimraf dist && vite build && npm run copyStudio", + "build": "rimraf dist && vite build && npm run copyStudio && npm run copy:visual-editing", "prepublishOnly": "npm run build", - "copyStudio": "cp -r src/studio dist/studio" + "copyStudio": "cp -r src/studio dist/studio", + "copy:visual-editing": "cp -r src/visual-editing dist/visual-editing" }, "files": [ "dist", "src/studio", + "src/visual-editing", "module.d.ts" ], "exports": { @@ -25,6 +27,10 @@ "./studio/studio-component.tsx": { "types": "./src/studio/studio-component.tsx", "default": "./src/studio/studio-component.tsx" + }, + "./visual-editing": { + "import": "./dist/visual-editing/index.ts", + "default": "./dist/visual-editing/index.ts" } }, "types": "./dist/types/index.d.ts",