-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs: Fix plant images #9208
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
docs: Fix plant images #9208
Conversation
| @@ -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'}; | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
Build successful! 🎉 |
| @@ -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'}; | |||
There was a problem hiding this comment.
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?
Fixes Filterable CRUD Table example in production builds. This was broken in #9135 due to
plants.tsbeing 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.