File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // CommonJS proxy to bypass jiti transforms from nuxt 2 and using native ESM
2+ module . exports = function ( ...args ) {
3+ return import ( './dist/index.mjs' ) . then ( m => m . default . call ( this , ...args ) )
4+ }
5+
6+ module . exports . meta = require ( './package.json' )
Original file line number Diff line number Diff line change 2323 "sideEffects" : false ,
2424 "exports" : {
2525 "." : {
26- "require" : " ./dist/ index.js " ,
26+ "require" : " ./index.cjs " ,
2727 "import" : " ./dist/index.mjs"
2828 }
2929 },
30- "main" : " dist /index.js " ,
31- "module" : " dist/index.mjs" ,
32- "types" : " dist/index.d.ts" ,
30+ "main" : " . /index.cjs " ,
31+ "module" : " ./ dist/index.mjs" ,
32+ "types" : " ./ dist/index.d.ts" ,
3333 "files" : [
34- " dist"
34+ " dist" ,
35+ " index.cjs"
3536 ],
3637 "scripts" : {
3738 "build" : " tsup" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Options } from 'tsup'
22
33const config : Options = {
44 splitting : false ,
5- format : [ 'esm' , 'cjs' ] ,
5+ format : [ 'esm' ] ,
66 entryPoints : [
77 'src/index.ts' ,
88 ] ,
You can’t perform that action at this time.
0 commit comments