mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
fix(nuxt): import builder path as file url
This commit is contained in:
parent
01ee5bd7c5
commit
a1691721d4
@ -1,3 +1,4 @@
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import chokidar from 'chokidar'
|
||||
import { isIgnored, tryResolveModule } from '@nuxt/kit'
|
||||
import { debounce } from 'perfect-debounce'
|
||||
@ -82,6 +83,6 @@ async function bundle (nuxt: Nuxt) {
|
||||
async function loadBuilder (nuxt: Nuxt, builder: string) {
|
||||
const builderPath = await tryResolveModule(builder, [nuxt.options.rootDir, import.meta.url])
|
||||
if (builderPath) {
|
||||
return import(builderPath)
|
||||
return import(pathToFileURL(builderPath).href)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user