Skip to content

Commit

Permalink
build(utils): buid for esm
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Jan 31, 2025
1 parent d23f355 commit 0ecb062
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
"main": "src/index.ts",
"files": [
"lib/",
"libESM",
"!**/*.map"
],
"scripts": {
"test:unit": "yarn g:jest --verbose -c ./jest.config.js",
"type-check": "yarn g:tsc --build tsconfig.json",
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib",
"build:lib": "yarn build:lib:cjs && yarn build:lib:esm",
"build:lib:cjs": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib",
"build:lib:esm": "yarn g:rimraf ./libESM && yarn g:tsc --build tsconfig.libESM.json && ../../scripts/replace-imports.sh ./libESM libESM",
"prepublishOnly": "yarn tsx ../../scripts/prepublishNPM.js",
"prepublish": "yarn tsx ../../scripts/prepublish.js"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/utils/tsconfig.libESM.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"outDir": "libESM",
"module": "ESNext",
"target": "esnext"
}
}

0 comments on commit 0ecb062

Please sign in to comment.