File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1- import type { ExternalVuetifyOptions } from './dist/module'
1+ import type { ExternalVuetifyOptions } from './dist/module.js '
22declare function defineVuetifyConfiguration ( vuetifyOptions : ExternalVuetifyOptions ) : ExternalVuetifyOptions ;
33export { defineVuetifyConfiguration } ;
Original file line number Diff line number Diff line change 3333 },
3434 "./*" : " ./*"
3535 },
36- "main" : " ./dist/module.cjs " ,
36+ "main" : " ./dist/module.mjs " ,
3737 "types" : " ./dist/types.d.ts" ,
3838 "files" : [
3939 " dist" ,
4242 " *.mjs"
4343 ],
4444 "scripts" : {
45- "prepack" : " nuxt-module-build prepare && nuxt-module-build build" ,
45+ "prepack" : " nuxt-module-build prepare && nuxt-module-build build && jiti scripts/postbuild.ts " ,
4646 "dev" : " nuxi dev playground" ,
4747 "dev:multiple-json" : " MULTIPLE_LANG_FILES=true nuxi dev playground" ,
4848 "dev:prepare" : " nuxt-module-build --stub && nuxt-module-build prepare && nuxi prepare playground" ,
Original file line number Diff line number Diff line change 1+ import { readFileSync , writeFileSync } from 'node:fs'
2+ import { resolve } from 'node:path'
3+
4+ // fix d.mts imports
5+ const mDtsModule = resolve ( 'dist/types.d.mts' )
6+ const mDtsModuleContent = readFileSync ( mDtsModule , 'utf-8' )
7+ writeFileSync (
8+ mDtsModule ,
9+ mDtsModuleContent . replaceAll (
10+ 'from \'./module\'' ,
11+ 'from \'./module.js\'' ,
12+ ) ,
13+ 'utf-8' ,
14+ )
You can’t perform that action at this time.
0 commit comments