-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
fix: Work-around for relative README links #133
Conversation
|
✅ Deploy Preview for preact-signals-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Size Change: 0 B Total Size: 65 kB ℹ️ View Unchanged
|
f3c9f00
to
31bb4e7
Compare
31bb4e7
to
92b298f
Compare
@rschristian I just realized this is for sub directories, while I was looking at the root README all the time 😅 This should do the trick:
I published a demo package to npm, you can see the contents here. |
Ah shoot, yep that seems to work. Someone from NPM once told me that was just metadata and not used for anything on their end. Didn't even think to check that. |
Co-authored-by: Kid <hi@xuann.wang>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🎉
Issue
Relative links to the repo root work great for our subpackages while browsing on GitHub, but this causes issues when published to NPM.
NPM's combination of the link with the repo URL unfortunately allows users to escape platform-specific path parameters. See the following:
Might be a bit too hopeful on my part for how intelligently NPM would handle this, but a disappointment nonetheless.Summary
The fix here (to which all credit goes to @kidonng) is just to specify the directory of the package in our
package.json
for each subproject.NPM can figure out the links from there.