Skip to content

Conversation

@FrankFMY
Copy link
Contributor

@FrankFMY FrankFMY commented Feb 5, 2026

Summary

  • Add .txt to the list of file extensions eligible for precompression in builder.js
  • Text files like robots.txt and ads.txt are highly compressible and should be precompressed alongside other text-based assets like .html, .xml, and .svg

Closes #15170

Add .txt to the list of extensions eligible for precompression.
Text files like robots.txt and ads.txt are highly compressible
and should be precompressed alongside other text-based assets
like .html, .xml, and .svg.

Closes sveltejs#15170
@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: 160735f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-docs-bot
Copy link

@FrankFMY
Copy link
Contributor Author

FrankFMY commented Feb 5, 2026

Added a changeset.

The failing CI check (test-kit-cross-browser / windows-latest / chromium / build) is a timeout in write_types/index.spec.js > Creates correct $types — unrelated to this change. All other 21 checks pass, including builder.spec.js which directly tests the precompression logic.

@dummdidumm dummdidumm marked this pull request as draft February 6, 2026 12:26
@dummdidumm
Copy link
Member

converting to draft while we decipher in the related issue what the reason was (if any) to omit .txt files from compression

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

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

I think we should merge this. I don't think there was any reason .txt was left out

The original PR (5 years ago!) just didn't have it: #1693

@benmccann benmccann marked this pull request as ready for review February 6, 2026 19:59
@FrankFMY
Copy link
Contributor Author

FrankFMY commented Feb 6, 2026

I think we should merge this. I don't think there was any reason .txt was left out

The original PR (5 years ago!) just didn't have it: #1693

Thank you!

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.

precompress: true ignores .txt files in the static folder

4 participants