Skip to content

Commit

Permalink
separate build tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Apr 21, 2024
1 parent 9536da3 commit 73eae48
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"packageManager": "pnpm@8.15.0",
"scripts": {
"compile": "rm -rf dist && pnpm run '/^compile:.*/'",
"compile:esm": "tsc -p .",
"compile:esm": "tsc -p tsconfig.esm.json",
"compile:cjs": "tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
"test": "pnpm run '/^test:.*/'",
"test:format": "prettier -c .",
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"module": "commonjs",
"moduleResolution": "node",
"verbatimModuleSyntax": false,
"declaration": true,
"outDir": "./dist/cjs"
}
},
"include": ["src"]
}
8 changes: 8 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"outDir": "./dist"
},
"include": ["src"]
}
7 changes: 2 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"baseUrl": ".",
"paths": {
"use-signals": ["./src"]
},
"declaration": true,
"outDir": "./dist"
},
"include": ["src"]
}
}
}

0 comments on commit 73eae48

Please sign in to comment.