File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 29
29
},
30
30
"main" : " ./index.cjs" ,
31
31
"module" : " ./index.mjs" ,
32
- "types" : " ./index.d.cts " ,
32
+ "types" : " ./index.d.ts " ,
33
33
"files" : [
34
34
" index.*"
35
35
],
Original file line number Diff line number Diff line change 1
1
// CommonJS proxy to bypass jiti transforms from nuxt 2 and using native ESM
2
- module . exports = function ( ...args ) {
2
+ exports . default = function ( ...args ) {
3
3
return import ( './index.mjs' ) . then ( m => m . default . call ( this , ...args ) )
4
4
}
5
5
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @vueuse/nuxt" ,
3
+ "type" : " module" ,
3
4
"version" : " 10.7.2" ,
4
5
"description" : " VueUse Nuxt Module" ,
5
6
"author" : " Anthony Fu <https://github.com/antfu>" ,
31
32
},
32
33
"main" : " ./index.cjs" ,
33
34
"module" : " ./index.mjs" ,
34
- "types" : " ./index.d.cts " ,
35
+ "types" : " ./index.d.ts " ,
35
36
"peerDependencies" : {
36
37
"nuxt" : " ^3.0.0"
37
38
},
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ export async function updatePackageJSON(indexes: PackageIndexes) {
248
248
directory : `packages/${ name } ` ,
249
249
}
250
250
packageJSON . main = './index.cjs'
251
- packageJSON . types = './index.d.cts'
251
+ packageJSON . types = packageJSON . type === 'module' ? './index.d.ts' : './index.d.cts'
252
252
packageJSON . module = './index.mjs'
253
253
if ( iife !== false ) {
254
254
packageJSON . unpkg = './index.iife.min.js'
You can’t perform that action at this time.
0 commit comments