Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure the path of the Node.js entry chunk #5398

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

alexkirsz
Copy link
Contributor

Description

This PR allows configuring a specific path to Node.js entry chunks. Before, these
would be generated under most of the same rules as dev chunks. However, in some
cases, Next.js expects these chunks to be under a specific path. In any case,
having unique chunk paths isn't particularly useful on the server-side.

Testing Instructions

N/A

@alexkirsz alexkirsz requested a review from a team as a code owner June 27, 2023 12:35
@vercel
Copy link

vercel bot commented Jun 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-designsystem-docs 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jul 6, 2023 8:21am
examples-svelte-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jul 6, 2023 8:21am
9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am
turbo-site ⬜️ Ignored (Inspect) Visit Preview Jul 6, 2023 8:21am

@alexkirsz
Copy link
Contributor Author

alexkirsz commented Jun 27, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Jun 27, 2023

✅ This change can build next-swc

@github-actions
Copy link
Contributor

github-actions bot commented Jun 27, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Determining jobs

See workflow summary for details

@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-css-client-references branch from ed15812 to 81d7fbf Compare June 27, 2023 13:58
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from f2553bc to 0aa5eef Compare June 27, 2023 13:58
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-css-client-references branch from 81d7fbf to c433a30 Compare July 3, 2023 11:27
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from 0aa5eef to 5dd12cf Compare July 3, 2023 11:27
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-css-client-references branch from 4f392bd to 9487de0 Compare July 3, 2023 13:25
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from 5dd12cf to e33a45f Compare July 3, 2023 13:25
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-css-client-references branch from 9487de0 to 6419597 Compare July 3, 2023 13:43
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from e33a45f to 1dc1c82 Compare July 3, 2023 13:43
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

Linux Benchmark for 73481b7

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 6368.30µs ± 25.47µs 6302.20µs ± 26.82µs -1.04%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5868.57µs ± 32.77µs 6027.18µs ± 119.64µs +2.70%
bench_startup/Turbopack CSR/1000 modules 913.13ms ± 1.92ms 908.29ms ± 2.20ms -0.53%

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

MacOS Benchmark for 73481b7

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.52ms ± 0.22ms 59.31ms ± 0.47ms +115.53% +108.80%
bench_hmr_to_eval/Turbopack CSR/1000 modules N/A 26.87ms ± 0.12ms N/A N/A
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.52ms ± 0.22ms 59.31ms ± 0.47ms +115.53% +108.80%
bench_hmr_to_eval/Turbopack CSR/1000 modules N/A 26.87ms ± 0.12ms N/A N/A
bench_startup/Turbopack CSR/1000 modules 3314.60ms ± 6.65ms 3409.21ms ± 52.23ms +2.85%

@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from 1dc1c82 to c410319 Compare July 4, 2023 09:45
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Linux Benchmark for f596f88

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 11.69ms ± 0.07ms 11.77ms ± 0.06ms +0.74%
bench_hmr_to_eval/Turbopack CSR/1000 modules 10.79ms ± 0.11ms 10.91ms ± 0.13ms +1.14%
bench_startup/Turbopack CSR/1000 modules 1150.67ms ± 2.41ms 1150.93ms ± 5.44ms +0.02%

Base automatically changed from alexkirsz/web-866-css-client-references to main July 4, 2023 12:07
@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from c410319 to 5050577 Compare July 4, 2023 12:09
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Linux Benchmark for a3a98f7

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 6157.20µs ± 38.02µs 6164.83µs ± 26.94µs +0.12%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5784.42µs ± 23.09µs 5759.22µs ± 36.97µs -0.44%
bench_startup/Turbopack CSR/1000 modules 916.99ms ± 0.50ms 921.12ms ± 5.50ms +0.45%

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

MacOS Benchmark for a3a98f7

Test Base PR % Significant %
bench_hmr_to_eval/Turbopack CSR/1000 modules 26.98ms ± 0.12ms 28.45ms ± 0.51ms +5.46% +0.80%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 28.24ms ± 0.22ms 27.98ms ± 0.06ms -0.92%
bench_hmr_to_eval/Turbopack CSR/1000 modules 26.98ms ± 0.12ms 28.45ms ± 0.51ms +5.46% +0.80%
bench_startup/Turbopack CSR/1000 modules 3364.25ms ± 16.06ms 3468.63ms ± 76.01ms +3.10%

@alexkirsz alexkirsz force-pushed the alexkirsz/web-866-node-entry-chunk-name branch from 5050577 to 6a09e10 Compare July 5, 2023 15:19
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Linux Benchmark for 27dc99a

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 6137.29µs ± 61.24µs 6080.00µs ± 40.59µs -0.93%
bench_hmr_to_eval/Turbopack CSR/1000 modules 5690.88µs ± 32.72µs 6078.15µs ± 395.94µs +6.81%
bench_startup/Turbopack CSR/1000 modules 917.96ms ± 0.85ms 922.70ms ± 5.70ms +0.52%

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

MacOS Benchmark for 27dc99a

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 6404.48ms ± 713.01ms 4097.37ms ± 155.91ms -36.02% -11.43%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 27.98ms ± 0.23ms 26.34ms ± 0.96ms -5.86%
bench_hmr_to_eval/Turbopack CSR/1000 modules 27.49ms ± 0.12ms 32.30ms ± 2.81ms +17.51%
bench_startup/Turbopack CSR/1000 modules 6404.48ms ± 713.01ms 4097.37ms ± 155.91ms -36.02% -11.43%

@sokra
Copy link
Member

sokra commented Jul 6, 2023

Test Case turbopack-tests::snapshot test_tests__snapshot__runtime__default_build_runtime (crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime)

fails with

the build chunking context does not support evaluated chunk groups

@alexkirsz alexkirsz added the pr: automerge Kodiak will merge these automatically after checks pass label Jul 6, 2023
@kodiakhq kodiakhq bot merged commit 006b5b1 into main Jul 6, 2023
@kodiakhq kodiakhq bot deleted the alexkirsz/web-866-node-entry-chunk-name branch July 6, 2023 08:28
feedthejim pushed a commit to vercel/next.js that referenced this pull request Jul 6, 2023
Depends on vercel/turborepo#5398 (and downstack) on
the Turbo side.

This PR makes it so the output path of Node.js entry chunks for pages is
determined solely from the pathname. This isn't actually necessary for
pages, but it makes for easier debugging anyway. See the Turbo PR for
more details.

This also changes the page structure so it also works if there is no
`pages` directory. In this case, we still want to use pages' default
_app, _document, and _error pages, even with existing app routes. So an
empty page structure should still have an effect.

## Turbopack updates

* vercel/turborepo#5415 <!-- Will Binns-Smith -
Turbopack: Execution tests in node.js -->
* vercel/turborepo#5461 <!-- Tobias Koppers - use a
lock to ensure atomic invalidation from file changes -->
* vercel/turborepo#5398 <!-- Alex Kirszenberg -
Configure the path of the Node.js entry chunk -->
* vercel/turborepo#5469 <!-- Tobias Koppers - allow
hmr tests to correctly detect hmr event -->
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

This PR allows configuring a specific path to Node.js entry chunks.
Before, these
would be generated under most of the same rules as dev chunks. However,
in some
cases, Next.js expects these chunks to be under a specific path. In any
case,
having unique chunk paths isn't particularly useful on the server-side.

### Testing Instructions

N/A
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

This PR allows configuring a specific path to Node.js entry chunks.
Before, these
would be generated under most of the same rules as dev chunks. However,
in some
cases, Next.js expects these chunks to be under a specific path. In any
case,
having unique chunk paths isn't particularly useful on the server-side.

### Testing Instructions

N/A
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

This PR allows configuring a specific path to Node.js entry chunks.
Before, these
would be generated under most of the same rules as dev chunks. However,
in some
cases, Next.js expects these chunks to be under a specific path. In any
case,
having unique chunk paths isn't particularly useful on the server-side.

### Testing Instructions

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants