ansible / ansible-ui

The UIs for Ansible Projects such as AWX, EDA, and HUB.

Home Page:https://ansible.github.io/ansible-ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebPack - Make public path dynamic

jamestalton opened this issue · comments

https://stackoverflow.com/questions/39879680/example-of-setting-webpack-public-path-at-runtime

Make it so that the index.html can specify the public path

    <script type="application/javascript">
        window.resourceBasePath = '/path/to/scripts/on/server/';
    </script>

Then add in the code support that.

The nginx config could possible then use a substitution filter to update the public path when serving the index.html
https://nginx.org/en/docs/http/ngx_http_sub_module.html

This would allow the UI to be served from dynamic paths on a server.