File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 23
23
"module" : " ./dist/index.js" ,
24
24
"exports" : {
25
25
"require" : {
26
- "types" : " ./dist/index.d.cts " ,
26
+ "types" : " ./dist/index.d.ts " ,
27
27
"default" : " ./dist/index.cjs"
28
28
},
29
29
"import" : {
Original file line number Diff line number Diff line change @@ -35,12 +35,11 @@ export default vite.defineConfig({
35
35
plugins : [
36
36
{
37
37
name : 'vite-tsc' ,
38
- generateBundle ( options ) {
39
- const ext = options . format === 'cjs' ? 'cts' : 'ts'
38
+ generateBundle ( ) {
40
39
this . emitFile ( {
41
40
type : 'asset' ,
42
- fileName : ` index.d.${ ext } ` ,
43
- source : `import useMeasure from '../src/index.ts';export * from '../src/index.ts';export = useMeasure;` ,
41
+ fileName : ' index.d.ts' ,
42
+ source : `import useMeasure from '../src/index.ts';export * from '../src/index.ts';export default useMeasure;` ,
44
43
} )
45
44
} ,
46
45
} ,
You can’t perform that action at this time.
0 commit comments