Skip to content

Commit 61f0172

Browse files
committedOct 22, 2024··
feat(module): rerun prepare command after installing module
resolves #520
1 parent c028656 commit 61f0172

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/commands/module/add.ts

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { satisfies } from 'semver'
1212
import { updateConfig } from 'c12/update'
1313
import { colors } from 'consola/utils'
1414
import { sharedArgs } from '../_shared'
15+
import { runCommand } from '../../run'
1516
import {
1617
checkNuxtCompatibility,
1718
fetchModules,
@@ -116,6 +117,10 @@ export default defineCommand({
116117
return null
117118
})
118119
}
120+
121+
// update the types for new module
122+
const args = Object.entries(ctx.args).filter(([k]) => k in sharedArgs).map(([k, v]) => `--${k}=${v}`)
123+
await runCommand('prepare', args)
119124
},
120125
})
121126

0 commit comments

Comments
 (0)
Please sign in to comment.