Closed trincadev closed 5 months ago
Can you explain why you're using path loader file for this?
You don't need to call anything, it should work by default.
\
You need to keep .env
inside docs/
if you're running vitepress dev docs
Hi @brc-dd, thank you for your response. I was using path loader because I couldn't understand how to make it work .env
variable loading. My error was keeping my .env
file at project root level instead than within docs
folder, now it works!
Thank you for your time, Alessandro
Hi there, great work! I'm writing this because I can't add some env variables on my vue components that I would use with giscus comment app. Since there are some sensitive github id data (data-repo-id and data-category-id in particular) I would like to load them as environment variables. For some reason
import.meta.env
contains only the default variables:My
.env
file:Right now I'm trying using to load these env variables in a
giscus.paths.ts
file, without any success. Can you explain me what I'm doing wrong?I'm using this the
giscus.paths.js
file:Importing this file I got this error:
In past I used to expose my environment variables via
vite.config.ts
but now it doesn't work anymore. Myvite.config.ts
:My package.json:
I have dotenv as dependency because I use it in playwright tests.
Any idea?