File tree Expand file tree Collapse file tree 4 files changed +57
-10
lines changed
Expand file tree Collapse file tree 4 files changed +57
-10
lines changed Original file line number Diff line number Diff line change 2828 "publishConfig" : {
2929 "access" : " public"
3030 },
31- "module" : " lib/index.js" ,
32- "typings" : " lib/index.d.ts" ,
31+ "main" : " lib/cjs/index.js" ,
32+ "module" : " lib/esm/index.js" ,
33+ "types" : " lib/index.d.ts" ,
34+ "exports" : {
35+ "." : {
36+ "import" : " ./lib/esm/index.js" ,
37+ "require" : " ./lib/cjs/index.js"
38+ }
39+ },
3340 "directories" : {
3441 "lib" : " lib" ,
3542 "test" : " test"
3643 },
3744 "scripts" : {
38- "build" : " tsc" ,
45+ "build" : " pnpm build:esm && pnpm build:cjs" ,
46+ "build:cjs" : " tsc -p ./tsconfig.cjs.json" ,
47+ "build:esm" : " tsc -p ./tsconfig.esm.json" ,
3948 "prepublish" : " pnpm build"
4049 },
4150 "dependencies" : {
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ./tsconfig.json" ,
3+ "compilerOptions" : {
4+ "module" : " CommonJS" ,
5+ "target" : " ES5" ,
6+ "rootDir" : " src" ,
7+ "outDir" : " lib/cjs"
8+ },
9+ "include" : [
10+ " src"
11+ ],
12+ "references" : [
13+ {
14+ "path" : " ../is-plain-object/tsconfig.cjs.json"
15+ }
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ./tsconfig.json" ,
3+ "compilerOptions" : {
4+ "module" : " ESNext" ,
5+ "target" : " ESNext" ,
6+ "rootDir" : " src" ,
7+ "outDir" : " lib/esm"
8+ },
9+ "include" : [
10+ " src"
11+ ],
12+ "references" : [
13+ {
14+ "path" : " ../is-plain-object/tsconfig.esm.json"
15+ }
16+ ]
17+ }
Original file line number Diff line number Diff line change 11{
22 "extends" : " ../../tsconfig.json" ,
33 "compilerOptions" : {
4- "module" : " ES2020" ,
5- "target" : " esnext" ,
6- "rootDir" : " src" ,
7- "outDir" : " lib"
4+ "checkJs" : false ,
5+ "rootDir" : " ." ,
6+ "downlevelIteration" : true
87 },
9- "include" : [" src" ],
10- "exclude" : [" lib" ],
11- "references" : [{ "path" : " ../is-plain-object/tsconfig.esm.json" }]
8+ "exclude" : [
9+ " lib"
10+ ],
11+ "references" : [
12+ {
13+ "path" : " ../is-plain-object"
14+ }
15+ ]
1216}
You canβt perform that action at this time.
0 commit comments