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

CSS link from README is dead #37

Open
Sorokin-Anton opened this issue Dec 18, 2023 · 8 comments
Open

CSS link from README is dead #37

Sorokin-Anton opened this issue Dec 18, 2023 · 8 comments

Comments

@Sorokin-Anton
Copy link

<link rel="stylesheet" href="https://esm.sh/@wooorm/starry-night@3/style/both">

from README points to 404

@wooorm
Copy link
Owner

wooorm commented Dec 19, 2023

It's a bug in esmsh, you can report it there

@kilianc
Copy link

kilianc commented May 16, 2024

this is still true

@wooorm
Copy link
Owner

wooorm commented May 16, 2024

do you want to raise it upstream?

@kilianc
Copy link

kilianc commented May 16, 2024

do you want to raise it upstream?

I don't know if you are trolling or not.

This does not see to be a bug in esmsh, but I don't know how esmsh works. What I know is that adding .css solves the issue: https://esm.sh/@wooorm/starry-night@3/style/both.css.

I'll open a PR.

kilianc added a commit to kilianc/starry-night that referenced this issue May 16, 2024
closes wooorm#37 

Signed-off-by: Kilian Ciuffolo <[email protected]>
@wooorm
Copy link
Owner

wooorm commented May 16, 2024

I am not trolling. You are ignoring what I am saying. It is a bug in esmsh.

@wooorm
Copy link
Owner

wooorm commented May 16, 2024

inb4: with ESM, with export maps, we have arbitrary URLs. I could decide that the API is xxx/foo-bar-baz. esmsh should map that to some file from the export map, say ./path/to/alpha-bravo-charlie.css, but it doesn’t matter where that file is on the file system. Based on that file, esm.sh can infer if that file is JavaScript or CSS or whatever.
But xxx/foo-bar-baz.css is not the API.

@kilianc
Copy link

kilianc commented May 16, 2024

You are ignoring what I am saying. It is a bug in esmsh.

I am not ignoring what you are saying, I am trying to help. The link in your readme is broken and I opened a PR to fix it. Looks like it's a fix that doesn't work for you, which is completely ok.

At least people that stumble upon this issue can read this thread and use my workaround.

I understand that xxx/foo-bar-baz.css is not the API, but I don't think users to this repo care, they try to use your project. Would you be open to documenting this in the README or is your stand to leave it broken until esm.sh fixes it?

@wooorm
Copy link
Owner

wooorm commented May 17, 2024

I understand that xxx/foo-bar-baz.css is not the API

It’s not a good workaround, when esmsh fixes this bug that workaround will break.
Export maps encapsulate APIs. Users can’t access arbitrary files inside packages with export maps.

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

Successfully merging a pull request may close this issue.

3 participants