Skip to content

feat: add suffix to rsc txt files for easy routing #80232

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

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

stefan-schubert-sbb
Copy link

  • enables easy handling for cdns or proxies to identify rsc payloads and route them correctly beside other txt files

Fixes #80231

@ijjk ijjk added the type: next label Jun 6, 2025
@stefan-schubert-sbb
Copy link
Author

@ijjk how can I get and review or reaction on this PR? Is something missing?

@stefan-schubert-sbb
Copy link
Author

@ijjk is there a chance to get a review on this or maybe at least a reaction?

@stefan-schubert-sbb stefan-schubert-sbb force-pushed the canary branch 4 times, most recently from eb2a471 to a446661 Compare July 23, 2025 05:50
@stefan-schubert-sbb stefan-schubert-sbb force-pushed the canary branch 2 times, most recently from dbc077a to 4b9a70b Compare July 25, 2025 07:24
@stefan-schubert-sbb stefan-schubert-sbb force-pushed the canary branch 5 times, most recently from a0ec6e0 to 92fadeb Compare August 7, 2025 12:11
Copy link

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments:

test/integration/app-dir-export/test/utils.ts (lines 46-59):

The test expectations still reference the old .txt file extensions, but the export functionality has been updated to generate .rsc.txt files, which will cause test failures.

View Details

Analysis

The export functionality has been updated across three files to change the file extension from .txt to .rsc.txt for RSC (React Server Components) files in export mode. However, the integration test file test/integration/app-dir-export/test/utils.ts still contains expected file lists that reference the old .txt extensions.

Specifically, the expectedWhenTrailingSlashTrue array (lines 46-59) and expectedWhenTrailingSlashFalse array (lines 76-89) expect files like:

  • index.txt
  • another/index.txt
  • another/first/index.txt
  • client/index.txt
  • etc.

But the actual export process now generates files with .rsc.txt extensions instead. This mismatch will cause integration tests to fail because they'll be looking for files that no longer exist with the old naming pattern.


Recommendation

Update all .txt references in the expected file arrays to .rsc.txt:

In expectedWhenTrailingSlashTrue:

  • Change 'another/first/index.txt' to 'another/first/index.rsc.txt'
  • Change 'another/index.txt' to 'another/index.rsc.txt'
  • Change 'another/second/index.txt' to 'another/second/index.rsc.txt'
  • Change 'client/index.txt' to 'client/index.rsc.txt'
  • Change 'image-import/index.txt' to 'image-import/index.rsc.txt'
  • Change 'index.txt' to 'index.rsc.txt'

Apply the same pattern to expectedWhenTrailingSlashFalse (lines 76-89), updating all corresponding .txt entries to .rsc.txt except for robots.txt which should remain unchanged as it's not an RSC file.

@stefan-schubert-sbb stefan-schubert-sbb force-pushed the canary branch 2 times, most recently from 07aa7e9 to c412c12 Compare August 8, 2025 12:01
@stefan-schubert-sbb stefan-schubert-sbb force-pushed the canary branch 2 times, most recently from 0d528a4 to 73f473b Compare August 8, 2025 17:52
@ijjk ijjk added the tests label Aug 8, 2025
* enables easy handling for cdns or proxies to identify rsc payloads and route them correctly beside other txt files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants