Skip to content

Commit 8f13ce3

Browse files
committed
fix(nuxt): expose loadBuilder error cause
1 parent 8fc9b9e commit 8f13ce3

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
@@ -244,8 +244,8 @@ async function bundle (nuxt: Nuxt) {
244244
async function loadBuilder (nuxt: Nuxt, builder: string): Promise<NuxtBuilder> {
245245
try {
246246
return await importModule(builder, { url: [directoryToURL(nuxt.options.rootDir), new URL(import.meta.url)] })
247-
} catch {
248-
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\``)
247+
} catch (err) {
248+
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 })
249249
}
250250
}
251251

0 commit comments

Comments
 (0)