mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): pass path to jiti
and not file URL (#27252)
This commit is contained in:
parent
58423772a1
commit
5ce738dbd8
@ -1,6 +1,6 @@
|
||||
import { existsSync } from 'node:fs'
|
||||
import { mkdir, writeFile } from 'node:fs/promises'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { fileURLToPath, pathToFileURL } from 'node:url'
|
||||
import { dirname, resolve } from 'pathe'
|
||||
import chokidar from 'chokidar'
|
||||
import { interopDefault } from 'mlly'
|
||||
@ -26,7 +26,7 @@ export default defineNuxtModule({
|
||||
const resolver = createResolver(import.meta.url)
|
||||
|
||||
// Initialize untyped/jiti loader
|
||||
const _resolveSchema = jiti(dirname(import.meta.url), {
|
||||
const _resolveSchema = jiti(dirname(fileURLToPath(import.meta.url)), {
|
||||
esmResolve: true,
|
||||
interopDefault: true,
|
||||
cache: false,
|
||||
|
Loading…
Reference in New Issue
Block a user