Skip to content
Discussion options

You must be logged in to vote

Use the serverOnly$ export from vite-env-only instead of naming it *.server

The .server suffix should only be applied to a file where all exports are on the server.

See this example:
https://github.com/kiliman/remix-global-data/blob/main/app/global-data.ts#L23

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by harrygr
Comment options

You must be logged in to vote
1 reply
@harrygr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants