rsnext/test
Jiachi Liu bf89bee37d
Support esm externals in app router (#65041)
### 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>
2024-05-07 21:14:58 +02:00
..
.stats-app Support React 19 in App and Pages router (#65058) 2024-05-07 18:18:32 +02:00
development Support React 19 in App and Pages router (#65058) 2024-05-07 18:18:32 +02:00
e2e Support esm externals in app router (#65041) 2024-05-07 21:14:58 +02:00
examples Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
integration Promote and rename server bundling options serverComponentsExternalPackages and bundlePagesExternals (#65421) 2024-05-07 11:19:35 -06:00
lib Support React 19 in App and Pages router (#65058) 2024-05-07 18:18:32 +02:00
production add experimental flag to allow forcing NODE_ENV=development in builds (#65463) 2024-05-07 11:35:13 -07:00
unit fix(next/image): add missing svg test refactor missing types (#65345) 2024-05-06 22:32:26 +00:00
.gitignore ci(workflow): enable test trace upload (#51107) 2023-06-12 17:14:13 +00:00
build-turbopack-build-tests-manifest.js Ensure production integration test results are uploaded (#63706) 2024-03-26 10:41:16 +01:00
build-turbopack-dev-tests-manifest.js Rename turbopack-tests-manifest to turbopack-dev-tests-manifest (#63409) 2024-03-19 10:26:14 +01:00
build-turbopack-tests-manifest.d.ts Update Turbopack test manifest from GitHub Actions artifact (#58394) 2023-11-24 16:48:12 +01:00
get-test-filter.js run tests from test suite that are not listed in the manifest (#58401) 2024-01-11 07:38:35 +00:00
jest-setup-after-env.ts Decrease default test timeouts (#56116) 2023-09-27 23:55:20 +00:00
ppr-tests-manifest.json add experimental client router cache config (#62856) 2024-04-02 05:42:18 -07:00
readme.md
related-tests-manifest.json Reapply "chore(test): run related E2E deploy tests on PRs" (#64682) (#64712) 2024-04-19 11:02:43 +02:00
test-file.txt
turbopack-build-tests-manifest.json Promote and rename server bundling options serverComponentsExternalPackages and bundlePagesExternals (#65421) 2024-05-07 11:19:35 -06:00
turbopack-dev-examples-manifest.json Fix last examples for Turbopack (#64020) 2024-04-03 16:02:52 +02:00
turbopack-dev-tests-manifest.json Promote and rename server bundling options serverComponentsExternalPackages and bundlePagesExternals (#65421) 2024-05-07 11:19:35 -06:00

See Testing for more information on how you can run/write/debug tests for Next.js.