mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(vite): add typecheck to vite plugins (#5464)
This commit is contained in:
parent
11aa8bf739
commit
cf255259ca
@ -88,7 +88,7 @@ export async function buildServer (ctx: ViteBuildContext) {
|
||||
// Add type-checking
|
||||
if (ctx.nuxt.options.typescript.typeCheck === true || (ctx.nuxt.options.typescript.typeCheck === 'build' && !ctx.nuxt.options.dev)) {
|
||||
const checker = await import('vite-plugin-checker').then(r => r.default)
|
||||
ctx.config.plugins.push(checker({ typescript: true }))
|
||||
serverConfig.plugins.push(checker({ typescript: true }))
|
||||
}
|
||||
|
||||
await ctx.nuxt.callHook('vite:extendConfig', serverConfig, { isClient: false, isServer: true })
|
||||
|
Loading…
Reference in New Issue
Block a user