Vue configs in AEM



Hello all,

We have created the config folder in vue project the hierarchy is something like this :




and how the configurations will pick when this bundle has deployed into AEM.

Or need some assistance on how to manage such things based on the environment in Vue+AEM.


Many Thanks,


Accepted Solutions (1)

Accepted Solutions (1)





You can integrate build scripts in the package.json where a specific build script will build the environment variables into the bundle.js during webpack or gulp JavaScript compilation.

Take example:

Or if your environment values are stored in the AEM server as JSON, you can utilise run modes, and OSGI configurations, to render the path of the configuration apart of the HTML page, then use JavaScript to make an XHR (request) to the request from the path.


<div class="global-config" data-global-config="/"></div>


Answers (0)