bf89bee37d
### What Support `esmExternals` working in app router ### Why `esmExternals` was disabled for app router that most of the packages are picking up the CJS bundles for externals. This PR enables to resolve the ESM bundle for external packages. We have two issues discovered while enabling the flag, any esm external packages will fail in client page SSR and server action. We fixed them by changing the below bundling logics: * When a client page having a async dependency, we can await the page during in rendering * When a server action having a async dependency, we changed the server action entry creation with webpack along with the server client entry creation together, then webpack can handle the modules async propagation properly. Fixes #60756 Closes NEXT-2435 Closes NEXT-2472 Closes NEXT-3225 --------- Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com> |
||
---|---|---|
.. | ||
.stats-app | ||
development | ||
e2e | ||
examples | ||
integration | ||
lib | ||
production | ||
unit | ||
.gitignore | ||
build-turbopack-build-tests-manifest.js | ||
build-turbopack-dev-tests-manifest.js | ||
build-turbopack-tests-manifest.d.ts | ||
get-test-filter.js | ||
jest-setup-after-env.ts | ||
ppr-tests-manifest.json | ||
readme.md | ||
related-tests-manifest.json | ||
test-file.txt | ||
turbopack-build-tests-manifest.json | ||
turbopack-dev-examples-manifest.json | ||
turbopack-dev-tests-manifest.json |