diff --git a/build.config.ts b/build.config.ts index d50e991..3a0079f 100644 --- a/build.config.ts +++ b/build.config.ts @@ -3,7 +3,6 @@ import { defineBuildConfig } from 'unbuild' export default defineBuildConfig({ entries: [ 'src/index', - 'src/worker', ], declaration: true, clean: false, diff --git a/package.json b/package.json index 98e3018..7539c88 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,9 @@ "require": "./dist/index.cjs" }, "./worker": { - "types": "./dist/worker.d.ts", - "import": "./dist/worker.mjs", - "require": "./dist/worker.cjs" + "types": "./worker.d.ts", + "import": "./dist/worker.js", + "require": "./dist/worker.js" }, "./*": "./*" }, @@ -52,6 +52,7 @@ } }, "files": [ + "worker.d.ts", "dist" ], "scripts": { @@ -60,8 +61,9 @@ "lint:fix": "eslint src --fix", "test": "vitest --no-isolate", "coverage": "vitest run --coverage", + "build:lib": "vite build && unbuild", "build:worker": "vite build --config vite.worker.config.ts", - "build": "vite build && unbuild && pnpm build:worker", + "build": "pnpm build:lib && pnpm build:worker", "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", "release": "bumpp package.json --commit \"release: v%s\" --push --all --tag", "typecheck": "tsc --noEmit", diff --git a/worker.d.ts b/worker.d.ts new file mode 100644 index 0000000..f0a766d --- /dev/null +++ b/worker.d.ts @@ -0,0 +1 @@ +export { }