parcel-plugin-prerender icon indicating copy to clipboard operation
parcel-plugin-prerender copied to clipboard

Problem with parcels dynamic imports

Open elbotho opened this issue 5 years ago • 0 comments

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/','./')

elbotho avatar Jun 17 '19 22:06 elbotho