- 09 Feb, 2023 4 commits
-
-
JJ Kasper authored
-
JJ Kasper authored
This fixes a mismatch in behavior between dev/start where bundle 404s could be rewritten in production but not dev. Also ensures we have a regression test for this behavior. x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1675869554570429) ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) --------- Co-authored-by:
Shu Uesugi <shu.chibicode@gmail.com>
-
Shu Ding authored
-
Jiachi Liu authored
## Feature For property that needs to be resolved as URL, compose with `metadataBase` if it's provided Closes NEXT-398 ### Detail updates * fix issue that path having extra `/` in the middle for pages path under app dir * don't render Meta if value is empty string, e.g. `og:title` can be `''` from value of `title.absolute` * did some refactor to separate resolvers into different files * add some unit tests for resolve urls - [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [x] Related issues linked using `fixes #number` - [x] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/contributing.md) --------- Co-authored-by:
Shu Ding <g@shud.in>
-
- 08 Feb, 2023 12 commits
-
-
Will Binns-Smith authored
This adds: - Documentation for Turbopack experimental fields `turbopackLoaders` and `resolveAlias` to the API reference site. - Typings and schema for the above Turbopack experimental options Test Plan: - `pnpm build`, updated an example to use TypeScript for its Next.js config, and verified the config passed with matching shapes and failed with mismatching shapes.
-
Steven authored
-
Vu Van Dung authored
The very-newly-released `generateMetadata` function currently does not allow itself to be synchronous. It leads to situations like this ```ts export async function generateMetadata() { return { title: "Hello, world!" }; } ``` where there's evidently no reason to use `async`, but it's forced by Next.js. This PR aims to remove this restriction: `generateMetadata` can be synchronous now. ## Bug - [x] Related issues linked using `fixes #45685` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [x] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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) Signed-off-by:Vu Van Dung <me@joulev.dev> Co-authored-by:
Jiachi Liu <inbox@huozhi.im>
-
Shu Ding authored
This PR changes the loader logic from something like `ctx.hasAppDir ? useAppLoaderForCSS : usePagesLoaderForCSS`, to a mental modal of `[ctx.hasAppDir ? useAppLoaderForCSSInAppLayer : null, usePagesLoaderForCSSInPagesLayer]`. This change makes sure that both pages and app can exist and work well together, instead of a binary switch. Also renamed the loader with `-dev` removed, because it is used for production build too. NEXT-461 ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Jan Kaifer authored
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Michael Law authored
-
Balázs Orbán authored
-
Dawid Czesak authored
-
OJ Kwon authored
<!-- 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(s) that you're making: --> Partially resolves WEB-544. This PR adds a new detection to the external env variable `NEXT_TEST_CONTINUE_ON_ERROR`. If those variable is set, even if a suite of test fails test runner will keep executing remaining tests. Turbopack (vercel/turbo) runs Next.js integration tests to track its feature parity to the existing Next.js features and currently it is expected to fail on certain test: however, we still want to execute all of the tests to track how many tests are passing / fails. Once this change lands turbopack need further verification to see if all of tests are actually running. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
JJ Kasper authored
Replaces usage of `hasHeader` of `getHeader` and also ensures we include `hasHeader` in our `mockRes` we create during revalidate for good measure. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) Closes: https://github.com/vercel/next.js/issues/34929 Closes: https://github.com/vercel/next.js/issues/37338 Closes: https://github.com/vercel/next.js/issues/45481
-
Jiachi Liu authored
Warn users when there's `head.js` being used in `app/`, and recommend to use metadata. Will show a warning in console while rendering Closes NEXT-268 --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site> Co-authored-by:
Lee Robinson <me@leerob.io>
-
Shu Ding authored
NEXT-476 ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
- 07 Feb, 2023 24 commits
-
-
Balázs Orbán authored
Realized when I was checking out https://github.com/vercel/next.js/issues/45431 that the package manager will complain about missing peer deps, even though they are not required with the `experimental.mdxRs` option. Fixing a small visual issue too: <details> <summary>Before:</summary> <img src="https://user-images.githubusercontent.com/18369201/215777932-caf133c0-1459-4c25-a438-11020e41f879.png"/> </details> <details> <summary>After:</summary> <img src="https://user-images.githubusercontent.com/18369201/215777802-d3f245ae-af56-46e9-8ccd-3bac241bdcfa.png"/> </details> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Mike Plummer authored
[Cypress](https://www.cypress.io/) recently went GA with a Component Testing offering which supports Next.js. This PR adds a brief section on what and how to use Cypress for component-level testing and updates the example project with a component test. Any feedback on content or the example is welcome, thanks for considering! ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
SCG82 authored
<!-- 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: --> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [x] 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>
-
Bennett Dams authored
Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
José Fernando Höwer Barbosa authored
<!-- 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: --> ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) First of all thanks for this amazing project and all the help you provide with these examples. It seems there is code duplication in this example. After some tests locally seem to _document.js is not necessary for `gtag` to work properly. https://github.com/vercel/next.js/blob/9d97a1e34a8a6e09eb127292c730d1a8df63ebb6/examples/with-google-analytics/pages/_app.js#L30-L34 https://github.com/vercel/next.js/blob/9d97a1e34a8a6e09eb127292c730d1a8df63ebb6/examples/with-google-analytics/pages/_document.js#L13-L17 I am aware of https://github.com/vercel/next.js/pull/40645 and I would like to ask @dave-hay, @SukkaW and @ijjk to consider this is still necessary. If so why then not move all content of the scripts from _app to _document? In any case, I am open to adding here some comments explaining what is the reason for this code duplication if necessary. <hr/> Changes that come from https://github.com/vercel/next.js/pull/43897 1. The `event` hashChangeComplete should be removed since `/home` and `/home/#section` is not new pageview, but just reference to the same page. If we go from /home to /home/#section (with a button click or a link for example) this shouldn't trigger a new page visit on `gtag`. For this reason, I think we should revert the changes from https://github.com/vercel/next.js/pull/36079. If there is a better argument of why this should stay I am also open to creating comments to clarify this on the example since I don't think should be the default behavior and not useful in most cases. 2. The `id="gtag-init"` was added with no context to the example from https://github.com/vercel/next.js/pull/29530 If there is a reason for this id in the script to existing I am open to adding a comment that clarifies this since in my experience is not necessary at all. Edit: Batching with https://github.com/vercel/next.js/pull/43897 as recommended by https://github.com/vercel/next.js/pull/43897#issuecomment-1344635000 --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Shu Ding authored
The server directive is allowed to have other directives and comments above. This PR fixes the transform with tests added for failing cases. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Sam Denty authored
This adds a new section about local overrides, as I ran into this error and it took me ages to figure out what was going wrong Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
JJ Kasper authored
Same as https://github.com/vercel/next.js/pull/40435 this ensures we don't prefetch for bots in `app-router` as well. Fixes: https://github.com/vercel/next.js/issues/45677 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
-
Wojtek Olek authored
Fixes #44424 by adding the `app` folder to an `ESLINT_DEFAULT_DIRS` constant which defines all folders where the linter should go through. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Jiachi Liu authored
Fix up a icon convention in #45612, we should pick up the `apple-icon.<ext>` as this is a shorter path for users to remember. Also addessing some feedbacks from @shuding in #45612 ---------
-
Jiachi Liu authored
Fixes styling issue introduced in #45586, lineHeight: 49 should be px instead of number **After** <img width="493" alt="image" src="https://user-images.githubusercontent.com/4800338/217356260-11f7d57b-31e0-401f-901f-f67eede3f6e3.png"> **Before** <img width="500" alt="image" src="https://user-images.githubusercontent.com/4800338/217356328-c5a1e0eb-cdaf-4f01-b6cb-a9323d740c22.png">
-
Hannes Bornö authored
Currently if an external package imports `'client-only'` it's difficult to figure out why the error occured. This change adds an explanation of which import caused the error. The errors in the images are from using `<style jsx>` in a Server Component. Before, runtime error on the server  After, webpack error with added stack trace  Fixes NEXT-409 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Jiachi Liu authored
x-ref: https://github.com/facebook/react/pull/26059 x-ref: https://github.com/facebook/react/pull/26083 x-ref: https://github.com/facebook/react/pull/26093 x-ref: https://github.com/facebook/react/pull/26083 Closes NEXT-445 * Remove extra `await` * Check if a component result is client reference, then we access for other exports
-
Jiachi Liu authored
This PR add supports for a shortcut for adding `icons.icon` or `icons.apple` metadata for page or layout with static files. Closes NEXT-263 Closes NEXT-260 If you specific icon.png or apple-touch-icon.png, they will be automatically picked by and added into metadata as `icon` and `apple-touch-icon` fields, and replace the `icons` field specified in page/layout level metadata exports. File matching rule: ``` icon -> /^icon\d?\.(ico|jpg|png|svg)$/ apple-touch-icon -> /^apple-touch-icon\d?\.(ico|jpg|png|svg)$/ ``` ## Feature - [x] 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` - [x] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/contributing.md) --------- Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Jan Kaifer authored
-
Shu Ding authored
This is necessary because TS config won't merge array fields and it will override parent plugins. In that case we will output a message instead:  ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Jan Kaifer authored
Commited tsconfig generated by running `next build`. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Jan Kaifer authored
fixes https://github.com/vercel/next.js/issues/42492
-
Tim Neutkens authored
Fixes https://github.com/reduxjs/redux-toolkit/issues/3154 Thanks @markerikson for helping out on this one. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Tim Neutkens authored
Mirrors the way the router fetches in `pages`. This is only needed for older browsers. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Luke Schlangen authored
Updating node version to LTS https://nodejs.org/ I tested locally and deploying to Google Cloud Run and build and deploy steps were successful in both cases. ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
JJ Kasper authored
-
Shu Ding authored
While debugging another thing I found that we are loading `loadJsConfig` 3 times during a build. Inside `loadJsConfig` we load TypeScript and call `ts.readConfigFile(tsConfigPath, ts.sys.readFile)` and `ts.parseJsonConfigFileContent`, which are expensive (411ms, about 10% of the build time of a demo app):  In one process these things are the same for all compilers and we should reuse them. NEXT-469 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/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)
-
Shu Ding authored
During build, there's no need to start N workers for type checking and linting, because there's no concurrency at all for these tasks (both TypeScript and ESLint are checking all files globally). During my test of `next build` for a small size project of 5 pages, this change reduces the peak memory usage by 545MB (as each worker holds a huge dependency chain). Before (there are too many worker threads initiated): <img width="1278" alt="before" src="https://user-images.githubusercontent.com/3676859/217116925-5594a45c-f1bb-4d11-8699-f6fe12ce7ee5.png"> After: <img width="1189" alt="CleanShot-2023-02-07-WfQTnB1D@2x" src="https://user-images.githubusercontent.com/3676859/217116940-a08a256e-b80d-4836-8b97-2837c845435e.png"> It improves the CPU usage as well. In the future we can spin up multiple workers and assign sub-task for each, but that only makes sense when the number of pages is large. NEXT-470
-