WebPack - Make public path dynamic
jamestalton opened this issue · comments
James Talton commented
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.