mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
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:
parent
411eee3b77
commit
e10517d4d7
@ -1,4 +1,4 @@
|
|||||||
import { resolve } from 'pathe'
|
import { normalize, resolve } from 'pathe'
|
||||||
import { createHooks } from 'hookable'
|
import { createHooks } from 'hookable'
|
||||||
import type { Nuxt, NuxtOptions, NuxtConfig, ModuleContainer, NuxtHooks } from '@nuxt/schema'
|
import type { Nuxt, NuxtOptions, NuxtConfig, ModuleContainer, NuxtHooks } from '@nuxt/schema'
|
||||||
import { loadNuxtConfig, LoadNuxtOptions, nuxtCtx, installModule, addComponent, addVitePlugin, addWebpackPlugin, tryResolveModule } from '@nuxt/kit'
|
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)
|
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()
|
addModuleTranspiles()
|
||||||
|
|
||||||
// Init nitro
|
// Init nitro
|
||||||
|
Loading…
Reference in New Issue
Block a user