mirror of https://github.com/nuxt/nuxt.git
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 { existsSync } from 'node:fs'
|
||||||
import { mkdir, writeFile } from 'node:fs/promises'
|
import { mkdir, writeFile } from 'node:fs/promises'
|
||||||
import { pathToFileURL } from 'node:url'
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
||||||
import { dirname, resolve } from 'pathe'
|
import { dirname, resolve } from 'pathe'
|
||||||
import chokidar from 'chokidar'
|
import chokidar from 'chokidar'
|
||||||
import { interopDefault } from 'mlly'
|
import { interopDefault } from 'mlly'
|
||||||
|
@ -26,7 +26,7 @@ export default defineNuxtModule({
|
||||||
const resolver = createResolver(import.meta.url)
|
const resolver = createResolver(import.meta.url)
|
||||||
|
|
||||||
// Initialize untyped/jiti loader
|
// Initialize untyped/jiti loader
|
||||||
const _resolveSchema = jiti(dirname(import.meta.url), {
|
const _resolveSchema = jiti(dirname(fileURLToPath(import.meta.url)), {
|
||||||
esmResolve: true,
|
esmResolve: true,
|
||||||
interopDefault: true,
|
interopDefault: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
|
|
Loading…
Reference in New Issue