File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -20,24 +20,17 @@ function nextFlightActionEntryLoader(this: any) {
2020 . flat ( )
2121
2222 return `
23- const actions = {
2423${ individualActions
25- . map ( ( [ id , path , name ] ) => {
26- return `'${ id } ': () => import(/* webpackMode: "eager" */ ${ JSON . stringify (
27- path
28- ) } ).then(mod => mod[${ JSON . stringify ( name ) } ]),`
24+ . map ( ( [ _ , path ] ) => {
25+ return `import(/* webpackMode: "eager" */ ${ JSON . stringify ( path ) } );`
2926 } )
3027 . join ( '\n' ) }
31- }
3228
33- // Using CJS to avoid this to be tree-shaken away due to unused exports.
34- module.exports = {
3529${ individualActions
36- . map ( ( [ id ] ) => {
37- return ` ' ${ id } ': actions[' ${ id } '](), `
30+ . map ( ( [ id , path , name ] ) => {
31+ return `export { ${ name } as " ${ id } " } from ${ JSON . stringify ( path ) } `
3832 } )
3933 . join ( '\n' ) }
40- }
4134`
4235}
4336
Original file line number Diff line number Diff line change @@ -870,7 +870,7 @@ export async function handleAction({
870870 }
871871 }
872872
873- const actionHandler = await (
873+ const actionHandler = (
874874 await ComponentMod . __next_app__ . require ( actionModId )
875875 ) [
876876 // `actionId` must exist if we got here, as otherwise we would have thrown an error above
You can’t perform that action at this time.
0 commit comments