Replies: 1 comment
-
I figured out a workaround, In {
"frontend:dev:watcher": "bash serve.sh"
} In #!/bin/bash
if [ $MODE == "test" ]; then
NODE_ENV=test npm run serve:test
else
npm run serve:dev
fi In {
"scripts": {
"serve:dev": "vite",
"serve:test": "vite --mode test"
}
} Now I can specify But this feels unintelligible, looking forward to a better solution. |
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
-
Hi, I am new to
wails
, and I created a project by using a Vite + Vue3 template,I found that
wails
runs withNODE_ENV=development
andVite mode=development
on commandwails dev
,NODE_ENV=production
andVite mode=production
on commandwails build
.My question is, for loading different frontend environment variables purpose, how to run
wails dev
/wails build
with any otherNODE_ENV
andVite mode
such astest
orstaging
?I can run
NODE_ENV=test wails dev
to specifyNODE_ENV
, but don't know how to deal withVite mode
,or is there a way to specify another
frontend:dev:watcher
/frontend:build
script while runningwails dev
/wails build
?or specify another
wails.json
likewails.test.json
or something?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions