parcel-plugin-prerender
parcel-plugin-prerender copied to clipboard
Relative deployment path support
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.)