Closed GODrums closed 11 months ago
@GODrums This is how you set an environment variable in Linux/Mac, it doesn't work on Windows, at least not in CMD and Powershell. It works with WSL and git bash.
Solution: cross-env
pnpm i cross-env
- "dev:firefox": "TARGET=Firefox vite",
+ "dev:firefox": "cross-env TARGET=Firefox vite",
I can add a section to the docs with this info.
Thank you for the extensive explanation! Your suggested solution works exactly as intented.
I would love a short section about this for us Windows users, although I probably should have been able to figure this out myself.
Summary
When using the
TARGET=
option for multibrowser support, the execution fails. This command is used in thepackage.json
to define the target browser. Many demos in the official repository utilize it (see e.g. demo-vue):Related documentation page: Multibrowser Support - Manifest Templates
The error:
Reproduction (using one of the example projects)
Clone this repository:
Navigate to one of the sample projects:
Run the failing command:
Environment