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 1717 },
1818 "exports" : {
1919 "./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+ }
2228 },
2329 "./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+ }
2638 }
2739 },
2840 "scripts" : {
2941 "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" ,
3145 "lint" : " eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" ,
3246 "ci" : " npm run lint && npm run build && npm run build:storybook" ,
3347 "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 77 "skipLibCheck" : true ,
88
99 /* Bundler mode */
10- "moduleResolution" : " NodeNext" ,
1110 "resolveJsonModule" : true ,
1211 "isolatedModules" : true ,
1312 "moduleDetection" : " force" ,
14- "outDir" : " dist" ,
13+ "outDir" : " dist/esm " ,
1514 "sourceMap" : true ,
1615 "declaration" : true ,
1716 "jsx" : " react-jsx" ,
2322 "noUnusedParameters" : false ,
2423 "noFallthroughCasesInSwitch" : true
2524 },
26- "include" : [" src" ]
25+ "include" : [" ./ src" ]
2726}
You can’t perform that action at this time.
0 commit comments