turbopack: Fix Server Actions in Edge runtime (#57462)
### What? Changes Server Actions to use a lazy `require()` statement instead of a lazy dynamic `import()`, to fix SA in the Edge runtime. ### Why? The Edge runtime has a restriction that it's not allowed to lazy load more files. The problem is that dynamic `import()` does exactly that, it defers importing those files until the call time. `require()` doesn't have this issue, because the chunks it would load are included instead of deferred. ### How? Just needed to modify the actions loader entry point… after hours of trying to get the action loader to evaluate in the node runtime and then import the actions in the edge runtime. Closes WEB-1874
Showing
Please
register
or
sign in
to comment