diff --git a/src/templates/meta/exports.ts.tpl b/src/templates/meta/exports.ts.tpl index bfb0e3702..e1fb45717 100644 --- a/src/templates/meta/exports.ts.tpl +++ b/src/templates/meta/exports.ts.tpl @@ -105,11 +105,8 @@ export async function getFullDemos() { // expand context for omit ext expandDemoContext(demo.context); }); - - return { - ...total, - ...demos, - }; + Object.assign(total, demos); + return total; }, {}), ); } @@ -184,10 +181,10 @@ export async function getFullRoutesMeta(): Promise> { })), ).then((ret) => ret.reduce( - (total, { id, meta }) => ({ - ...total, - [id]: meta, - }), + (total, { id, meta }) => { + total[id] = meta; + return total; + }, {}, ), );