diff --git a/package.json b/package.json index 91b203e..7c9b94b 100755 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "url": "git://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#.git" }, "scripts": { - "build": "tsc", + "build": "rm -rf dist && pnpm build:cjs && pnpm build:esm", + "build:cjs": "tsc -p tsconfig.json", + "build:esm": "tsc -p tsconfig.esm.json", "test": "vitest", "typecheck": "tsc --noEmit", "check:cmd": "biome check --no-errors-on-unmatched", diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000..ee915e0 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ES2015", + "outDir": "./dist/esm" + } +}