parcel
parcel copied to clipboard
Is there a way to build html with relative assets url?
Choose one: is this a 🐛 bug report or 🙋 feature request?
🙋 feature request
🤔 Expected Behavior
When exec parcel build docs/index.html
, the generated html should have relative assets url, such as:
<script src="./89ee6b6452b6649c72b85a19637b8362.js"></script>
😯 Current Behavior
The url is an absolute path:
<script src="/dist/89ee6b6452b6649c72b85a19637b8362.js"></script>
💁 Possible Solution
Is there a way to build html with relative assets url? Maybe some configuration?
🔦 Context
A common practice is to only host the dist (or public) dir using a static server. But with absolute path, it cannot find the assets resource.