-
Hey! How to expose environmental variables (without VITE_ prefix) to main process in such a way, that they aren't visible in renderer processes?
I thought that DB_PASSWORD will be exposed to non-client source code, like main process. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You may customize prefixes. See |
Beta Was this translation helpful? Give feedback.
You may customize prefixes. See
envPrefix
. In your case, probably needed add two diferent prefixes:['VITE_', 'MAIN_']
.VITE_
for shared environmental variables, andMAIN_
only for main process. LikeMAIN_DB_PASSWORD