The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
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:
Would not have the leading slash and instead look like this:
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.