Config flag that alters npm build process to remove leading slash in index.html asset references?

Is there a way or config flag somewhere in webpack/npm that changes all asset references in the main outputted index.html to not have a leading slash?

So, something like these two in index.html:
href="/icon_120x120.2f7752bee9dcd06e998fd44640e47485.png"/><link rel="manifest"
<script type="text/javascript" src="/vendor.55ac148e530190f3c848.chunk.js">

Would not have the leading slash and instead look like this:
href="icon_120x120.2f7752bee9dcd06e998fd44640e47485.png"/><link rel="manifest"
<script type="text/javascript" src="vendor.55ac148e530190f3c848.chunk.js">

I understand that a post-build script could probably find and replace this leading slash string pattern, but I wanted to ask if there’s a simple config flag in npm’s build process that changes this for all asset references in the main index.html.

Any help would be much appreciated.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.