ci010 / electron-vue-next

A starter template for using vue-next with the electron.
https://ci010.github.io/electron-vue-next/
191 stars 27 forks source link

Support .env files in Vite style #23

Closed cawa-93 closed 3 years ago

cawa-93 commented 3 years ago

I've added loading environment variables from .env files just like Vite does. All environment variables can be used as import.meta.env in main and render processes.

I had to change both tsconfig.json files. @ci010, Can this somehow affect the Vetur plugin or something else?

ci010 commented 3 years ago

Looks good. But this is a large patch, and I've never use .env before. I'll take a look tomorrow.