Skip to content

Expose credentials to the Vite process #96

Answered by ElMassimo
pepicrft asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Pedro! The equivalent would be:

ViteRuby.env['VALUE'] = Rails.application.credentials.dig(:value)

If you are planning to use the environment variable in client code, you might want to check vite-plugin-environment, or alternatively prefix it with VITE_.

Replies: 2 comments 4 replies

Comment options

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

You must be logged in to vote
4 replies
@ElMassimo
Comment options

@Iwaide
Comment options

@ElMassimo
Comment options

@Iwaide
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
4 participants