Skip to content
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

Make env route dynamic #125

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Make env route dynamic #125

merged 1 commit into from
Nov 4, 2024

Conversation

grod220
Copy link
Contributor

@grod220 grod220 commented Nov 4, 2024

Possibly closes #121

By default, the api/env route was being built statically at build time. It looks like Nextjs recognized that it depended on static variables (env vars) and thought it a good idea to pre-build the route's response #facepalm.

Before:
Screenshot 2024-11-04 at 10 43 03 AM

After:

Screenshot 2024-11-04 at 10 42 08 AM

@grod220 grod220 self-assigned this Nov 4, 2024
@conorsch
Copy link
Contributor

conorsch commented Nov 4, 2024

Nice! This change resolved the specific problem reported in #121, where testnet asset lookup was failing. Running this new code, I see in the browser console that the correct lookup is performed via GET:

dex-successful-asset-lookup

which confirms that the server-side env var is now properly configuring the app behavior, as we wanted. Problems still remain in terms of overall app stability, but will file follow-up issues for those so they can be addressed appropriately.

@conorsch conorsch merged commit 2f3633d into main Nov 4, 2024
6 checks passed
@conorsch conorsch deleted the force-dynamic branch November 4, 2024 19:40
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.

bug: registry assets fail to load in prod build
2 participants