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

fix(trpc): adding host and port env variables to nitro dev process & … #695

Merged
merged 1 commit into from
Oct 21, 2023

Commits on Oct 20, 2023

  1. fix(trpc): adding host and port env variables to nitro dev process & …

    …using them for trpc during dev
    
    $fetch is smart enough to infer the host and port for our trpc client
    when it is used on the server. However, $fetch is only available during
    the pre-render phase and during SSR of the prod nitro server. It is not
    available during development when we work with the vite server. This PR
    adds the host & port from the vite server as env variables and uses them
    as fallbacks. It also adjusts the Nx plugin's and trpc-app's vite config
    files to make sure that the index page is server side rendered, but not
    pre-rendered to avoid not displaying the latest data.
    goetzrobin committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    7df4901 View commit details
    Browse the repository at this point in the history