How to pass "mode" to vite #10320
Unanswered
cristiancs
asked this question in
Help
Replies: 1 comment
-
The You may want to read this page: https://turbo.build/docs/crafting-your-repository/using-environment-variables |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I'm migrating a CI to turborepo that runs
yarn build:appname --mode testing
, so vite can build the app with the correct env vars for testing. But i'm not sure how can i translate this to turborepoI read the docs about environment variables but it doens't seem clear how to do this (i think the example for vite defaults to being a different command)
The only way i have been able to replicate this, is by adding a
build:staging
command to all package.jsonAdditional information
I tried:
But it doesn't work (and i think i'm not using env correctly here)
Also tried:
and doing export of
NODE_ENV
andPROD
vars on the shell (as these are the variables that vite changes according to https://vite.dev/guide/env-and-mode#modes, but this also doesn't workBeta Was this translation helpful? Give feedback.
All reactions