Idea for access node running environment variables at SSR Mode without building



  • Hi,
    currently, I am using ssr mode for developing my project.
    and each time when some environment variables need update.
    The Jenkins pipeline will involve the building process for the changes.
    sometime even for some little tiny changes, like change api host address.
    because we set the api env at quasar.conf.js build block. like below:

    ...
        build: {
          env: {
    java_api_host:JSON.stringify(process.env.JAVA_API_HOST)
          },
    ...
    

    so,

    when we using some container tools like docker.

    some time you just can bring the ENV params into the built package. because it is already generated content,
    if you check the /dist/ssr/www/js/app.xxxxx.js
    f71fa0c5-6515-4e7a-9106-79dc6a2e2b23-image.png
    so there is no way for me to bring those env variables directly to the ssr dist files, it’s won’t work.
    fa1784ef-cfc9-4222-9cb9-f8499cf568f9-image.png

    is there any solution that for me to optimize this issue?

    appreciate.



  • This post is deleted!

Log in to reply