Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt): normalize string transpile paths for windows (#5461)
Browse files Browse the repository at this point in the history
* fix(nuxt): normalize string transpile paths for windows

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

Co-authored-by: pooya parsa <pyapar@gmail.com>
  • Loading branch information
danielroe and pi0 authored Jun 15, 2022
1 parent 411eee3 commit e10517d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nuxt/src/core/nuxt.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e10517d

Please sign in to comment.