ixkaito / astro-relative-links

Build Astro with relative links.
MIT License
70 stars 4 forks source link

Relative link not work in few scenarios #9

Closed yagee closed 1 month ago

yagee commented 9 months ago

Hi there!

Thank you again for this wonderful plugin!

I got these two cases, when astro-relative-links actually won't work:

  1. In embedded <styles>
  2. In script URL's

1: image image

2: image image

I made this stackblitz example: https://stackblitz.com/edit/withastro-astro-z6nzxi?file=dist%2Findex.html

Just run pnpm i and pnpm build in terminal, and in both html files (dist/index.html and dist/01/index.html) you can see there are no changes in URL's to font and to pictures.

Is it possible to make this work?

Thank you!

ixkaito commented 9 months ago

@yagee Thank you for your report. I'll take a look.

bnjmnrsh commented 2 months ago

I could really use this as well for a project Im currently on - is there a blocking issue? What needs to be done? I could submit a PR.

Kellytom commented 2 months ago

I could really use this as well for a project Im currently on - is there a blocking issue? What needs to be done? I could submit a PR.

Maybe Try ngrok if u need a solution now.

ixkaito commented 1 month ago

I'm sorry, everyone. I'm really busy with my client work. I think I'll be able to offer some solutions this weekend.

ixkaito commented 1 month ago

I released v4.0 to add support for embedded <style>. However, the second case is very difficult. While it is possible to support this, there is a risk of unintended replacements occurring in other areas as well.

yagee commented 1 month ago

Thanks @ixkaito ! I think this issue is solved, second case really rare.