Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Relative deployment path support #42

Open
lajoiemedia opened this issue May 17, 2020 · 0 comments
Open

Relative deployment path support #42

lajoiemedia opened this issue May 17, 2020 · 0 comments

Comments

@lajoiemedia
Copy link

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.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant