Skip to content

Controlling the publicPath in the index.html page

I tried using this tool for a quick way to deploy a small demo but I did not found a way to control the deploy base path used by resources in index.html

My deploy URL is something like https://xxx.github.io/project/

Looking at source code and few documentation available I found references to publicPath usage in the wmr.config.js file, but it is not working (at least not for this).

MY HTML file is something like this:

	<link rel="preload" as="script" href="./index.js" crossorigin>
	<link rel="stylesheet" href="/style.css">
</head>

<body>
	<script type="module" src="/index.js"></script>
	```

But final HTML file generated in build directory is always root based.