File tree Expand file tree Collapse file tree 3 files changed +30
-8
lines changed Expand file tree Collapse file tree 3 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 17
17
},
18
18
"exports" : {
19
19
"./vanilla" : {
20
- "import" : " ./dist/vanilla/index.js" ,
21
- "types" : " ./dist/vanilla/index.d.ts"
20
+ "import" : {
21
+ "types" : " ./dist/esm/vanilla/index.d.js" ,
22
+ "default" : " ./dist/esm/vanilla/index.js"
23
+ },
24
+ "require" : {
25
+ "types" : " ./dist/cjs/vanilla/index.d.js" ,
26
+ "default" : " ./dist/cjs/vanilla/index.js"
27
+ }
22
28
},
23
29
"./react" : {
24
- "import" : " ./dist/react/index.js" ,
25
- "types" : " ./dist/react/index.d.ts"
30
+ "import" : {
31
+ "types" : " ./dist/esm/react/index.d.js" ,
32
+ "default" : " ./dist/esm/react/index.js"
33
+ },
34
+ "require" : {
35
+ "types" : " ./dist/cjs/react/index.d.js" ,
36
+ "default" : " ./dist/cjs/react/index.js"
37
+ }
26
38
}
27
39
},
28
40
"scripts" : {
29
41
"dev" : " vite" ,
30
- "build" : " tsc" ,
42
+ "build:esm" : " tsc -p tsconfig.json && echo '{\" type\" : \" module\" }' > dist/esm/react/package.json && echo '{\" type\" : \" module\" }' > dist/esm/vanilla/package.json" ,
43
+ "build:cjs" : " tsc -p tsconfig.cjs.json && echo '{\" type\" : \" commonjs\" }' > dist/cjs/react/package.json && echo '{\" type\" : \" commonjs\" }' > dist/cjs/vanilla/package.json" ,
44
+ "build" : " npm run build:esm && npm run build:cjs" ,
31
45
"lint" : " eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" ,
32
46
"ci" : " npm run lint && npm run build && npm run build:storybook" ,
33
47
"storybook" : " storybook dev -p 6006" ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ./tsconfig.json" ,
3
+ "compilerOptions" : {
4
+ "module" : " CommonJS" ,
5
+ "moduleResolution" : " Node" ,
6
+ "esModuleInterop" : true ,
7
+ "outDir" : " ./dist/cjs"
8
+ }
9
+ }
Original file line number Diff line number Diff line change 7
7
"skipLibCheck" : true ,
8
8
9
9
/* Bundler mode */
10
- "moduleResolution" : " NodeNext" ,
11
10
"resolveJsonModule" : true ,
12
11
"isolatedModules" : true ,
13
12
"moduleDetection" : " force" ,
14
- "outDir" : " dist" ,
13
+ "outDir" : " dist/esm " ,
15
14
"sourceMap" : true ,
16
15
"declaration" : true ,
17
16
"jsx" : " react-jsx" ,
23
22
"noUnusedParameters" : false ,
24
23
"noFallthroughCasesInSwitch" : true
25
24
},
26
- "include" : [" src" ]
25
+ "include" : [" ./ src" ]
27
26
}
You can’t perform that action at this time.
0 commit comments