diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4889dab..b591dd2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,3 +49,4 @@ jobs: disable_search: true files: coverage/lcov.info token: ${{ secrets.CODECOV_TOKEN }} + - run: yarn run build diff --git a/package.json b/package.json index 99a82e25..93d7a258 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,7 @@ "url": "https://github.com/ikatyang" }, "exports": { - ".": { - "types": "./dist/index.d.mts", - "default": "./dist/index.mjs" - } + ".": "./dist/index.js" }, "license": "MIT", "scripts": { diff --git a/tsconfig.json b/tsconfig.json index 513d74dc..f7ad4e78 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,5 +11,10 @@ "noEmit": true, "allowImportingTsExtensions": true }, - "include": ["src/**/*.ts", "tests/**/*.ts", "vitest.config.ts"] + "include": [ + "src/**/*.ts", + "tests/**/*.ts", + "vitest.config.ts", + "tsdown.config.ts" + ] } diff --git a/tsdown.config.ts b/tsdown.config.ts new file mode 100644 index 00000000..e771f578 --- /dev/null +++ b/tsdown.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'tsdown'; + +export default defineConfig({ + external: ['@babel/types'], + fixedExtension: false, +});