vue-cli-plugin-electron-builder icon indicating copy to clipboard operation
vue-cli-plugin-electron-builder copied to clipboard

how can add external file, that can use for changes in BaseUrl's and other config things.

Open umerdev228 opened this issue 1 year ago • 5 comments

Hello,

I need to add a file like env in vue js, where we can set or change base url's and other config things for application level after build.

Thanks

umerdev228 avatar Nov 03 '22 09:11 umerdev228

I have no clue what you want. Please start by reading the docs. And don't forget that this project uses electron-builder, so a lot of things can be found in their docs.

MatthijsBurgh avatar Nov 03 '22 10:11 MatthijsBurgh

@MatthijsBurgh let me try to deliver my issue. when we build application using vue js or nuxt js. We have .env files to handle configuration things. I need same thing for electron builder to handle these things or attributes. Because after build there are no files to change configurations.

umerdev228 avatar Nov 03 '22 10:11 umerdev228

I think electron-builder allows adding extra files. Check their docs. You can configure the electron-builder in your vue.config.js, see https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/configuration.html.

MatthijsBurgh avatar Nov 03 '22 10:11 MatthijsBurgh

from my understanding, u just wanna persistently store the users's configs ? if that is the case, then https://github.com/sindresorhus/electron-store is good choice

JunzheFan avatar Nov 05 '22 06:11 JunzheFan

hello @JunzheFan after build or after created exe file. I need to change BASE URL for api's and some localization data like static key words. how can I attach or add a file that available after build and I can change config things in it after build.

umerdev228 avatar Nov 05 '22 09:11 umerdev228