parcel-plugin-prerender
parcel-plugin-prerender copied to clipboard
Problem with parcels dynamic imports
If I use the dynamic import (see here)
with the prerenderer the resulting script tags use absolute paths starting with http://localhost:8000
something like
import('./main').then(function(page) {
// Render page
page.render()
})
results in
<script async type="text/javascript" charset="utf-8" src="http://localhost:8000/main.5c28f114.js"></script>
I didn't find a way to force relative paths in parcel. Any ideas how I could solve this elegantly?
(atm. i use something like .replace('http://localhost:8000/','./')