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,