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

Relative deployment path support

Open lajoiemedia opened this issue 4 years ago • 0 comments

When parcel is launched with the option parcel build --public-url ./ in order to build for deployment outside the root of the server, static-rendered routes no longer reference their resources correctly.

For my directory structure

  • build/
    • index.html
    • script_hash.js
    • myroute/
      • index.html

build/index.html will have a script tag that looks like: <script src="script_hash.js"></script> (Which is good)

BUT

build/myroute/index.html will also have a script tag which looks like: <script src="script_hash.js"></script> (Which will fail since the script is not in the same subdir)

The same applies to other resources (CSS, ico, etc.)

lajoiemedia avatar May 17 '20 13:05 lajoiemedia