Best way to use an environment variable in app.html? #9526
-
Before we upgraded > 2.13 we were using process.env.HEAP_ID in a script tag in app.html. That no longer seems to work past nuxt 2.13. Whats the best way to do this going forward? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
As of right now our solution was to use the webpack lodash syntax referenced in the vue cli docs. (even though this isn't a vue cli app I figured we are still using the htmlWebpackPlugin) So we are doing this and it seems to be working. But, i'd like to upgrade to vite when vue 3 is out and i'm not sure that will be supported. So my question remains in nuxt > 2.13 how do you use env variables in app.html?
|
Beta Was this translation helpful? Give feedback.
As of right now our solution was to use the webpack lodash syntax referenced in the vue cli docs. (even though this isn't a vue cli app I figured we are still using the htmlWebpackPlugin)
So we are doing this and it seems to be working. But, i'd like to upgrade to vite when vue 3 is out and i'm not sure that will be supported. So my question remains in nuxt > 2.13 how do you use env variables in app.html?