cli
cli copied to clipboard
[Feature]: Env variables support
What area(s) will this request affect?
Extension
What type of change do you want to see?
New feature
Overview
I thought it would be nice to have env variables support similar to Vite (https://vite.dev/guide/env-and-mode) - those can be set in .env file or in vite config. In Shopify CLI I imagine that they could be set on shopify.app.toml level and possibly in .env file. Then it should replace all import.meta.env... in extension files.
Motivation
Need simpler way to store API endpoint variable depending on the environment (dev/staging/production)