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

[BUG]: wrong anchor link in the website #649

Closed
PerfectPan opened this issue Apr 4, 2024 · 4 comments
Closed

[BUG]: wrong anchor link in the website #649

PerfectPan opened this issue Apr 4, 2024 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@PerfectPan
Copy link
Contributor

The website's anchor links appear to be incorrect, missing the original path, such as /blog/introducing-pages-router, as shown in the picture.

CleanShot 2024-04-04 at 23 03 40@2x

@sandren
Copy link
Sponsor Collaborator

sandren commented Apr 5, 2024

Thanks for reporting.

The root cause is an invalid <base> tag on nested routes:
https://github.com/dai-shi/waku/blob/main/packages/waku/src/lib/plugins/vite-plugin-rsc-index.ts#L80

@dai-shi
Copy link
Owner

dai-shi commented Apr 5, 2024

// HACK without <base>, some relative assets don't work.
// FIXME ideally, we should avoid this.
{ tag: 'base', attrs: { href: opts.basePath } },

Yeah, I knew it wasn't the right solution. So, it's a framework issue.
It may require someone's help. Help wanted.

@dai-shi dai-shi added the help wanted Extra attention is needed label Apr 5, 2024
@Aslemammad
Copy link
Contributor

working on this!

dai-shi pushed a commit that referenced this issue May 5, 2024
…root path (#697)

Solve #649.

I did some research based on #674.
The root cause is that css path in html missing / so that when brower
try to join the real path, it will use the current path instead of root
path.

![CleanShot 2024-05-05 at 00 44
55@2x](https://github.com/dai-shi/waku/assets/24316656/55ac214d-b5c9-49ed-9e67-95b59ed837b8)

![CleanShot 2024-05-05 at 00 45
27@2x](https://github.com/dai-shi/waku/assets/24316656/40021aeb-acbe-4f07-ac9f-79e9d7ebaa2a)
@dai-shi
Copy link
Owner

dai-shi commented May 6, 2024

by #697

@dai-shi dai-shi closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants