Commit Graph

4 Commits

Author SHA1 Message Date
Niklas Mischkulnig 47b9fc6128 Turbopack: Allow ESM externals in SSR (#70258)
Closes PACK-3244
Closes https://github.com/vercel/next.js/issues/69562

Await the module in both environments (SSR/browser), if it's async in at
least one of them.

We can't and don't want to make the browser module async (artifically)
if the SSR module is async (due to ESM externals).

The only concern regarding `async` not always being true in the manifest
was that we don't want to await in non TLA cases (e.g. CJS exporting a
promise, etc...).
But the SSR module being ESM with TLA and the browser module being CJS
with a Promise export is exceedingly unlikely.
2024-10-01 14:41:21 +02:00
Niklas Mischkulnig 739e0c3ce0 Add test for serverExternalPackages inside node_modules (#68156)
Adds a test for the change in https://github.com/vercel/next.js/pull/67948
2024-07-30 09:33:27 +02:00
Tobias Koppers efc5ae42a8 Turbopack: app externals test case improvements (#62871)
### What?

* rename test case
* improve error message and handle edge case for require resolving
* fix test case actually testing externals (webpack was silently
bundling, Turbopack showed error that helped to find the broken test
case)

### Why?

### How?


Closes PACK-2662
2024-03-14 07:22:40 +00:00
Jiachi Liu 8d28d5954e test: rename node_modules_bak to node_modules (#62066)
We switched to `pnpm` for testing instead of `yarn` for e2e tests
containing customized node_modules packages, it works with
`node_modules` folder before. Rename the existing `node_modules_bak`
hack to make it easy to test with.

Previously we use `yarn` but it will clean `node_modules` folder so we
have to use another script to copy packages, it's not a required thing
now so we can test package from node_modules directly without renaming
folders locally

Closes NEXT-2496
2024-02-15 00:42:35 +01:00