From a47924a06dd9a3329db8826fe295996311f1c8b5 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sat, 24 Feb 2024 17:43:35 +0100 Subject: [PATCH] fix: export condition --- build.config.ts | 3 --- package.json | 9 +++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.config.ts b/build.config.ts index 23e3ebc..3e232f7 100644 --- a/build.config.ts +++ b/build.config.ts @@ -5,7 +5,4 @@ export default defineBuildConfig({ 'src/index.ts', ], declaration: true, - rollup: { - emitCJS: true, - }, }) diff --git a/package.json b/package.json index 7de36e2..5532d26 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,13 @@ "rough", "sketchy" ], + "exports": { + ".": { + "import": "./dist/index.mjs" + } + }, "main": "dist/index.mjs", - "module": "dist/index.cjs", + "module": "dist/index.mjs", "types": "dist/index.d.mts", "files": [ "dist" @@ -36,7 +41,7 @@ "devDependencies": { "@antfu/eslint-config": "^2.6.4", "bumpp": "^9.3.0", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "typescript": "^5.3.3", "unbuild": "^2.0.0" }