Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

environment varriables with vite

//if you want to access your env variable TEST_VAR you should prefix it with VITE_
VITE_TEST_VAR=123f
//you can access it with
import.meta.env.VITE_TEST_VAR
 
PREVIOUS NEXT
Tagged: #environment #varriables #vite
ADD COMMENT
Topic
Name
8+6 =