including-modules

This commit is contained in:
Kismet Hasanaj
2026-05-03 00:14:08 +02:00
parent ec83a0d879
commit 39a8a128be
20434 changed files with 3906546 additions and 3 deletions
@@ -0,0 +1,22 @@
function nextFlightActionEntryLoader() {
const { actions } = this.getOptions();
const actionList = JSON.parse(actions);
const individualActions = actionList.map(([path, actionsFromModule])=>{
return actionsFromModule.map(({ id, exportedName })=>{
return [
id,
path,
exportedName
];
});
}).flat();
return `
${individualActions.map(([id, path, exportedName])=>{
// Re-export the same functions from the original module path as action IDs.
return `export { ${exportedName} as "${id}" } from ${JSON.stringify(path)}`;
}).join('\n')}
`;
}
export default nextFlightActionEntryLoader;
//# sourceMappingURL=next-flight-action-entry-loader.js.map