Sammyjo20 / lasso

🐎 Lasso is a Laravel package created to make your deployments blazing fast.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vite environments (modes) and lasso

ggolda opened this issue · comments

commented

Vite supports multiple environments via specifying a flag --mode {stage} during build command: https://vitejs.dev/guide/env-and-mode.html

The problem is when building on local with lasso vite for some reason ignores these .env.{stage} files. In documentation it is said that:

In addition, environment variables that already exist when Vite is executed have the highest priority and will not be overwritten by .env files. For example, when running VITE_SOME_KEY=123 vite build.

Can it be related that Lasso runs vite and passes the same environment as laravel currently have which overrides variables from .env.{stage} files?

commented

The only way to fix it that I found is to override LASSO_BUILD_COMMAND to '' and run npm run build --mode {stage} manually and just use lasso as a bundle publishing tool.

Hey @ggolda I'm very sorry for the delay in this issue. Are you still having this issue or still need assistance?