Commit Graph

10 Commits

Author SHA1 Message Date
Benjamin Woodruff 7cb54ace75 [ci] Update playwright to 1.61.0 (#94871)
[Playwright v1.61.0 adds support for
ubuntu-26.04](https://github.com/microsoft/playwright/releases/tag/v1.61.0).
When Lindsey created our arm64 runners (see
https://github.com/vercel/next.js/pull/94870), [he picked the
ubuntu-26.04
image](https://vercel.slack.com/archives/C01LN7C5QR5/p1781608258610389?thread_ts=1781118174.353839&cid=C01LN7C5QR5)
(which is technically still [in
preview](https://github.com/actions/runner-images#available-images), but
IMO that's fine).
2026-06-18 21:39:11 +00:00
Sebastian "Sebbie" Silbermann 672b02b270 [next-playwright] Use unique cookie values for instant navigation testing lock (#91250)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-16 21:07:56 +00:00
Luke Sandberg 9ba29b4125 Revert "Revert "Revert "Revert "Add a --webpack flag and default --turbopack to true (#84216)"""" (#84394)
Reverts vercel/next.js#84389

Attempt number 3, #84374 fixed propagation of bundler environment variables to vercel cli operations, to ensure the test configuration is respected. 

[Deployment Tests Run 1](https://github.com/vercel/next.js/actions/runs/18146684793/job/51649631635).  A fair number of failures.

[Deployment Tests Run 2](https://github.com/vercel/next.js/actions/runs/18154875270). After #84395.  These still have a set of failures, but i confirmed that the deployment builds are running `webpack`.  

The tests that are failing are related to 'prefetches' (test/e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts and test/e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts) and generally the error is a timeout.  Recent deployment runs for canary releases are also failing, but on different tests.


Trying again after #[84419](https://github.com/vercel/next.js/pull/84419).  [Deployment Tests Run 3](https://github.com/vercel/next.js/actions/runs/18173375427).  Failures appeared flaky, rerunning failures...
2025-10-01 17:04:17 -07:00
JJ Kasper 3dcb889505 Revert "Revert "Revert "Add a --webpack flag and default --turbopack to true (#84216)""" (#84389)
These are still failing so reverting again to keep canary in clean state
https://github.com/vercel/next.js/actions/runs/18143375558/job/51641994595

Reverts vercel/next.js#84351
2025-09-30 15:36:29 -07:00
Luke Sandberg 9a76ce433b Revert "Revert "Add a --webpack flag and default --turbopack to true (#84216)"" (#84351)
Reverts vercel/next.js#84348  which itself reverted #84216. 

In the 2nd attempt to make --turbopack a default behavior.
* adjust the Generate Pull Request States action to specify `--webpack`
* set the `IS_WEBPACK_TEST` flag in the deployment e2e tests (which are now [passing](https://github.com/vercel/next.js/actions/runs/18113062122))
* make the warning about having a webpack config without a turbopack config more verbose and consistently an error
2025-09-30 08:23:10 -07:00
JJ Kasper dadfaa1b5a Revert "Add a --webpack flag and default --turbopack to true (#84216)" (#84348) 2025-09-29 10:22:06 -07:00
Luke Sandberg 97056e0d80 Add a --webpack flag and default --turbopack to true (#84216)
Make Turbopack the default bundler for Next 🚀

## What

Add a `--webpack` flag so users can select webpack

Change behavior so if neither `--turbopack` or `--webpack` is set we default to Turbopack.

If we have defaulted the build to turbopack and we observe that the user has a `webpack` config in their next config but no turbopack config, then we issue a warning about this being a potential problem, if this happens during `next build` the warning becomes an error and fails the build.  The solution for users is just to explicitly set `--webpack` or `--turbopack`

There were a number of subtle issues
* some users directly set the `TURBOPACK` environment variable, this PR adds support for that though users should really be passing `--turbopack` so it will not be documented
* rspack is enabled via a plugin that sets an environment variable when loading next config, which means it happens way too late!
   * For builds this isn't too bad, we just have to recompute the `Bundler` after loading the config.  For `dev` the parent process can get out of sync with the child, but this is only really relevant for telemetry and for that we already load the config in the parent so just defer computing `isTurboSession`.

Most of this is about fixing package.json scripts and CI builds configs.

* For package.json 
   * i added aliases e.g. `test-dev` == `test-dev-webpack` but preserved the old names.  In the long run we will want to remove the unsuffixed aliases 
   * this required some modifications to existing configs to ensure everything was setting the correct env variables

* For ci, i added a new `IS_WEBPACK_TEST` variable to a number of tests but preserved all names.
   * Again, in the future it would make sense to rename ci jobs but that is deferred for right now.
   * This also makes it clear that a set of tests scenarios (e.g. ppr, experimental, test-new-tests-*) never run with turbopack. This is not addressed right now but should be in the future.

## Why

Today, the default bundler for next is webpack but with turbopack becoming stable it is time to just ship it.   Turbopack is already recommended for dev and builds.  Create Next App also steers users towards Turbopack.  According to telemetry we already have about 50% of all dev sessions and build adoption is growing.  So fundamentally why are we even asking users to make a decision?
2025-09-26 16:24:17 -07:00
Luke Sandberg cee784dea0 [turbopack] vibecode a benchmark runner for module-cost (#82287)
# Add automated benchmark runner for module-cost

## What?
This PR adds an automated benchmark runner for the module-cost benchmark, allowing for consistent measurement of module loading and execution times.

## Why?

It is to tedious and error prone to run the benchmark. 

## Usage

Build `next` and turbopack however you like
```
pnpm i
pnpm prepare-bench
pnpm build-webpack (or build-turbopack)
pnpm benchmark
```

## How?

v0 mostly
2025-08-04 16:16:57 -07:00
Luke Sandberg d85d3e2734 [turbopack] tweak the ui of the module-cost benchmark (#81817)
Have the module-cost benchmark page self identify and output into a text box to make copy-pasting the data out easier.
2025-07-29 10:46:55 -07:00
Tobias Koppers 48b2976ed2 Turbopack: add module cost benchmark (#81530)
### What?

Add a benchmark that requires/imports nearly 10k of empty modules.

Measures load and execution time for these modules.

Might also be useful to measure the compile overhead of modules.
2025-07-11 14:34:38 +02:00