fix(nuxt): normalize string transpile paths for windows (#5461)

* fix(nuxt): normalize string transpile paths for windows

* Update packages/nuxt/src/core/nuxt.ts

Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
Daniel Roe 2022-06-15 12:52:46 +01:00 committed by GitHub
parent 411eee3b77
commit e10517d4d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { resolve } from 'pathe'
import { normalize, resolve } from 'pathe'
import { createHooks } from 'hookable'
import type { Nuxt, NuxtOptions, NuxtConfig, ModuleContainer, NuxtHooks } from '@nuxt/schema'
import { loadNuxtConfig, LoadNuxtOptions, nuxtCtx, installModule, addComponent, addVitePlugin, addWebpackPlugin, tryResolveModule } from '@nuxt/kit'
@ -125,6 +125,9 @@ async function initNuxt (nuxt: Nuxt) {
await nuxt.callHook('modules:done', { nuxt } as ModuleContainer)
// Normalize windows transpile paths added by modules
nuxt.options.build.transpile = nuxt.options.build.transpile.map(t => typeof t === 'string' ? normalize(t) : t)
addModuleTranspiles()
// Init nitro