0e8f2412ae
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> This PR exposes internal injection point to specify custom binary / bindings for the turbopack. It doesn't affect any existing native bindings (swc), but only allows to run custom turbopack (`turbo.startDev`) if specified. The changes are mostly for the internal dev / testing iteration purpose. Currently, the workflow to test new turbopack changes in next.js is - update next-swc's cargo to point to specific changes in turbopack - rebuild, specify next.js to use local binary This requires additional build times (turbopack build cannot be used, have to rebuild next-swc napi bindings) as well as if we'd like to try some changes on the CI between next.js canary + latest turbopack, integration gets bit tricky. 2 env variable is exposed for the purpose - `__INTERNAL_CUSTOM_TURBOPACK_BINARY` stands for the executable binary (next-dev) can be built in turbopack, `__INTERNAL_CUSTOM_TURBOPACK_BINDINGS` stands for the custom napi bindings if needed. Both are strictly internal as name implies. There won't be any documentation, no semver guarantee or else. Current plan is to execute some subset of next.js test on turbopack PRs with these entrypoints. Feature / security wise these are mostly harmless I believe - this is devserver usually don't run on CI, and trying to print out warning if flag is enabled. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) Co-authored-by: JJ Kasper <jj@jjsweb.site> |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-config-next | ||
eslint-plugin-next | ||
font | ||
next | ||
next-bundle-analyzer | ||
next-codemod | ||
next-env | ||
next-mdx | ||
next-plugin-storybook | ||
next-polyfill-module | ||
next-polyfill-nomodule | ||
next-swc | ||
react-dev-overlay | ||
react-refresh-utils |