Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stencil routes not working on deploy folder #146

Open
carlos-gomez-espinosa opened this issue Jan 3, 2023 · 1 comment
Open

Stencil routes not working on deploy folder #146

carlos-gomez-espinosa opened this issue Jan 3, 2023 · 1 comment

Comments

@carlos-gomez-espinosa
Copy link

Resources:
Before submitting an issue, please consult our docs.

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

 insert the output from npm list @stencil/core here

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

Current behavior:
npm init stencil
type -> component

we can start successfully the component with npm start.
If i do npm build and copy www folder to an IIS, routing doesn't work

Expected behavior:
When deploying the app, all example routes should work

Steps to reproduce:
image

@gtranter
Copy link

gtranter commented Apr 17, 2023

I'm facing the same issue using a Spring Web application.

In my case, when a server context-path is not set (i.e. not the default "/") for the Spring application it works fine but if it is set to anything else it fails to work.

Update:

This turned out to be a simple matter of reading docs and setting the root property on the router element e.g. <stencil-router root="/context-path/">

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

No branches or pull requests

2 participants