Project confguration can be set using environment variables or .env
files as described in vite documentation. The defaults are provided in .env file.
The recommended approach for changing config values during local development is to create a .env.local
file at the root of the project. This file is in .gitignore
so your local overrides won't be tracked in git.
Supported environment variables:
VITE_ENABLE_MOCK_SERVICE_WORKER
- when set totrue
enables msw mock service worker with handlers defined in mocks folder; if you want to use it instead of the real API, don't forget to changeVITE_API_BASE_URL
to/mock-api
VITE_REACT_QUERY_DEVTOOLS
- when set totrue
enables react-query devtoolsVITE_API_BASE_URL
- base url of the api yet to be built; can be set to/mock-api
to use the mocked version of the API (the same one that is used for tests)