Stencil: Cannot deploy to a subfolder path

Created on 13 Nov 2019  路  2Comments  路  Source: ionic-team/stencil

Stencil version:

 @stencil/[email protected]

I'm submitting a:
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

  • If the app is deployed to a non-root path, it fails to display.

Expected behavior:

  • The app should be deployable to any path on website.

Steps to reproduce:

  • Create a blank app using ionic-pwa template.
  • Deploy to github/gitlab pages. e.g., https://a.gitlab.io/starter/
  • The page serves blank index.html with 404s for all assets and js files.
triage

Most helpful comment

  1. Upgraded @stencil/core to 1.8.0, but it didn't help.
  2. Tried baseUrl per https://stenciljs.com/docs/www, but it didn't help. The output was written to www/subfolder, but all asset URLs were still hard-coded from the root "/".

All 2 comments

  1. Upgraded @stencil/core to 1.8.0, but it didn't help.
  2. Tried baseUrl per https://stenciljs.com/docs/www, but it didn't help. The output was written to www/subfolder, but all asset URLs were still hard-coded from the root "/".

It seems you need to change the paths in index.html manually, the baseUrl setting doesn't do it for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ckrack picture ckrack  路  3Comments

elmariofredo picture elmariofredo  路  3Comments

bekliev picture bekliev  路  3Comments

romulocintra picture romulocintra  路  3Comments

karsvaniersel picture karsvaniersel  路  3Comments