mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 07:12:37 +00:00
fix(vite): expose underlying import errors (#1696)
This commit is contained in:
parent
9b8d44d130
commit
6f1f12af16
@ -71,7 +71,7 @@ async function transformRequest (opts: TransformOptions, id: string) {
|
||||
|
||||
if (await isExternal(opts, id)) {
|
||||
return {
|
||||
code: `(global, exports, importMeta, ssrImport, ssrDynamicImport, ssrExportAll) => import('${(pathToFileURL(id))}').then(r => { exports.default = r.default; ssrExportAll(r) })`,
|
||||
code: `(global, exports, importMeta, ssrImport, ssrDynamicImport, ssrExportAll) => import('${(pathToFileURL(id))}').then(r => { exports.default = r.default; ssrExportAll(r) }).catch(e => { console.error(e); throw new Error('[vite dev] Error loading external "${id}".') })`,
|
||||
deps: [],
|
||||
dynamicDeps: []
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user