You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an odd issue this week where my remix application was working fine locally but when deployed on AWS via lambda, it began throwing a lot of (seemingly random) hydration errors. As it turns out, the base app created by the remix generator has an issue with how meta tags are defined within its root.tsx file. I can't necessarily reproduce the issue locally but I can say the base file deviates from how remix recommends them be authored: https://remix.run/docs/en/main/route/meta#global-meta
Expected Behavior
The application should render with the following metatags.
Personally, i would go w/ the former since that's the recommendation by remix. More than happy to open a PR, just let me know if we're in agreement on option 1.
The text was updated successfully, but these errors were encountered:
… applications #23037 (#23169)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->
<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->
## Current Behavior
<!-- This is the behavior we have today -->
Meta tags that are required and recommended for remix apps are not being
rendered correctly when deployed to serverless locations such as AWS
Lambda
We do not attach them in the way that Remix recommends
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Attach these meta tags in the method that remix itself recommends to
ensure maximum compatibility
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes#23037
Current Behavior
I ran into an odd issue this week where my remix application was working fine locally but when deployed on AWS via lambda, it began throwing a lot of (seemingly random) hydration errors. As it turns out, the base app created by the remix generator has an issue with how meta tags are defined within its
root.tsx
file. I can't necessarily reproduce the issue locally but I can say the base file deviates from how remix recommends them be authored: https://remix.run/docs/en/main/route/meta#global-metaExpected Behavior
The application should render with the following metatags.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
There are two options for resolving.
Option 1 (Recommended): Since these tags are expected to be on all pages we can include them within the base app component. This also avoids possible merging issues (noted here: https://remix.run/docs/en/main/route/meta#global-meta).
The content at https://github.com/nrwl/nx/blob/master/packages/remix/src/generators/application/files/common/app/root.tsx__tmpl__#L20-L23
would become
or we can properly format the MetaFunction here: https://github.com/nrwl/nx/blob/master/packages/remix/src/generators/application/files/common/app/root.tsx__tmpl__#L11-L15
Personally, i would go w/ the former since that's the recommendation by remix. More than happy to open a PR, just let me know if we're in agreement on option 1.
The text was updated successfully, but these errors were encountered: