Skip to content

Conversation

@devongovett
Copy link
Member

Fixes Filterable CRUD Table example in production builds. This was broken in #9135 due to plants.ts being included in the downloadable ZIP. Parcel content hashes URLs by default, but this changes the length of the string which messes up the RSC payload. This changes those plant images to be non-content hashed, which should be fine since they should never change.

@@ -1,5 +1,5 @@
// @ts-ignore
import assets from 'url:../pages/**/*.{png,jpg,svg}';
import assets from 'url:../pages/**/*.{png,jpg,svg}' with {env: 'react-client'};
Copy link
Member Author

Choose a reason for hiding this comment

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

Ensuring we only get one copy of the images, not one for the server environment and one for the client environment.

Copy link
Member

Choose a reason for hiding this comment

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

I can't find any documentation on this import, is it specific to parcel or one of our pipelines?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah this is a secret parcel syntax. ideally images would not be specific to an environment in the first place but that will require an upstream change. this is a quick workaround.

@rspbot
Copy link

rspbot commented Nov 18, 2025

@@ -1,5 +1,5 @@
// @ts-ignore
import assets from 'url:../pages/**/*.{png,jpg,svg}';
import assets from 'url:../pages/**/*.{png,jpg,svg}' with {env: 'react-client'};
Copy link
Member

Choose a reason for hiding this comment

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

I can't find any documentation on this import, is it specific to parcel or one of our pipelines?

@devongovett devongovett added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit e5f75bb Nov 18, 2025
32 checks passed
@devongovett devongovett deleted the fix-plants branch November 18, 2025 20:13
devongovett added a commit that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants