Open jdinartejesus opened 2 years ago
@jdinartejesus did you try to pass just the production
for the -e
? or switch with places the npm run gql:generate
with vite build
?
I've worked today with the env-cmd
and vitejs and did not have any problems. Here is a simple example using both tools
Edit: seems like the env-cmd
is setting the env variables for the first command, to run multiple commands see this docs
I'm currently using Vuejs with Vitejs, but when I'm running the build in production, the variables are undefined. Vitejs it's like ReactCreateApp, using the REACTAPP prefix, but instead we need to use VITE_ prefix, and even when applying this still doesn't work.
.env-cmdrc.js
package.json: