I have a working vue-cli app, that I can build without a problem. Now, I want to package a single build that will be deployed on several servers. My problem is that, depending on the server, I'll have to tweak some simple variables (server port, API token, etc.).
Clearly, it's not a suitable solution to run several builds (based on .env files, or whatever) because of the context. I often get settings information on site and have to configure them quickly.
Before working with Webpack and all its underlying compilation process, I had a classic js file embedding the settings and I would like to produce something similar. For what I know, files created on the public
folder are not reachable from vue components (with import directive) and once minified, it's not a solution to tweak settings.
Is it possible to tell vue-cli3 or webpack to keep a specific file or folder "as is"? Or maybe that there is a way cleaner solution?