Open anson2004 opened 2 years ago
Hello,
I have separated staging and production environments so I define custom system env for our electron-vue application.
And I create a build script in package.json and try to use cross-env to specify the custom system env value.
Here is a example in package.json "build-prod": "cross-env API_URL=abc.com AUTH_URL=auth.io node .electron-vue/build.js && electron-builder",
"build-prod": "cross-env API_URL=abc.com AUTH_URL=auth.io node .electron-vue/build.js && electron-builder",
But after I run "npm run build" and install it, these system env is not set up in vue application.
Could I ask is there a better way to set up system env in vue application so I can use "process.env" in the vue code and get correct value?
Br, Yiqing
Hello,
I have separated staging and production environments so I define custom system env for our electron-vue application.
And I create a build script in package.json and try to use cross-env to specify the custom system env value.
Here is a example in package.json
"build-prod": "cross-env API_URL=abc.com AUTH_URL=auth.io node .electron-vue/build.js && electron-builder",
But after I run "npm run build" and install it, these system env is not set up in vue application.
Could I ask is there a better way to set up system env in vue application so I can use "process.env" in the vue code and get correct value?
Br, Yiqing