Skip to content

Commit

Permalink
add support to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Jul 14, 2024
1 parent 62e2108 commit 933f41b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2015",
"outDir": "./dist/esm"
}
}

0 comments on commit 933f41b

Please sign in to comment.