From 87efa4c9acdcaba5ca24ce65666543da624dc8f4 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 12 Mar 2024 20:07:28 +0100 Subject: [PATCH] Add CJS output of preview entry --- package.json | 6 +++--- tsup.config.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 36d896d..1703ed9 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,13 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.cjs", - "import": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.cjs" }, "./preview": { "types": "./dist/index.d.ts", "import": "./dist/preview.js", - "require": "./dist/preview.js" + "require": "./dist/preview.cjs" }, "./preset": "./dist/preset.cjs", "./manager": "./dist/manager.js", diff --git a/tsup.config.ts b/tsup.config.ts index d9a86f2..bdcb5a5 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -88,7 +88,7 @@ export default defineConfig(async (options) => { dts: { resolve: true, }, - format: ["esm"], + format: ["esm", "cjs"], target: BROWSER_TARGET, platform: "browser", external: globalPreviewPackages,