Skip to content

Commit 3e0408b

Browse files
committed
fix(nuxt): expose loadBuilder error cause
1 parent 201cf1a commit 3e0408b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nuxt/src/core/builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ async function bundle (nuxt: Nuxt) {
240240
async function loadBuilder (nuxt: Nuxt, builder: string): Promise<NuxtBuilder> {
241241
try {
242242
return await importModule(builder, { url: [directoryToURL(nuxt.options.rootDir), new URL(import.meta.url)] })
243-
} catch {
244-
throw new Error(`Loading \`${builder}\` builder failed. You can read more about the nuxt \`builder\` option at: \`https://nuxt.com/docs/api/nuxt-config#builder\``)
243+
} catch (err) {
244+
throw new Error(`Loading \`${builder}\` builder failed. You can read more about the nuxt \`builder\` option at: \`https://nuxt.com/docs/api/nuxt-config#builder\``, { cause: err })
245245
}
246246
}
247247

0 commit comments

Comments
 (0)