mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
fix(nitro): resolve default export for assets
This commit is contained in:
parent
4e1865358c
commit
49e4c038b5
@ -88,7 +88,7 @@ export function getAsset (id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const inlineAssets = `const assets = {\n${Object.keys(assets).map(id =>
|
const inlineAssets = `const assets = {\n${Object.keys(assets).map(id =>
|
||||||
` ['${id}']: {\n read: () => import('${assets[id].fsPath}'),\n meta: ${JSON.stringify(assets[id].meta)}\n }`
|
` ['${id}']: {\n read: () => import('${assets[id].fsPath}').then(r => r.default || r),\n meta: ${JSON.stringify(assets[id].meta)}\n }`
|
||||||
).join(',\n')}\n}`
|
).join(',\n')}\n}`
|
||||||
return `${inlineAssets}\n${assetUtils}
|
return `${inlineAssets}\n${assetUtils}
|
||||||
export function getAsset (id) {
|
export function getAsset (id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user