Skip to content

Conversation

@SoonIter
Copy link
Member

@SoonIter SoonIter commented Jun 25, 2025

Summary

https://github.com/facebook/docusaurus/blob/45065e8d2b5831117b8d69fec1be28f5520cf105/packages/docusaurus/src/client/exports/Link.tsx#L78

I 'm done with withBase and removeBase and withoutBase addLeadingSlash addTrailingSlash

it is silly and wasting my life

Related Issue

close #2321

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Jun 25, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 4b03b82
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/685cd53c5644230008244f92
😎 Deploy Preview https://deploy-preview-2322--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jun 25, 2025

Deploy Preview for rspress ready!

Name Link
🔨 Latest commit 4b03b82
🔍 Latest deploy log https://app.netlify.com/projects/rspress/deploys/685cd53c20f6a1000812f6d3
😎 Deploy Preview https://deploy-preview-2322--rspress.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 83 (🔴 down 13 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (🟢 up 9 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title refactor!: use basename feature of react-router refactor(runtime)!: use basename feature of react-router Jun 25, 2025
@JounQin
Copy link
Collaborator

JounQin commented Jun 25, 2025

Could this PR make #1677 possible? Example virtual runtime module:

`export const base = typeof __RSPRESS_BASE_HREF__ === 'undefined' ? ${JSON.stringify(base)} : __RSPRESS_BASE_HREF__`

@SoonIter
Copy link
Member Author

Could this PR make #1677 possible? Example virtual runtime module:

`export const base = typeof __RSPRESS_BASE_HREF__ === 'undefined' ? ${JSON.stringify(base)} : __RSPRESS_BASE_HREF__`

It's really similar to publicPath configuration in webpack

There are also some compile-time stages that read the base configuration like plugins, and we can't guarantee that they are correct either if we only modify them at runtime.

@SoonIter SoonIter force-pushed the syt/refactor-basename branch from e966bfd to b1b6011 Compare June 26, 2025 03:48
@SoonIter SoonIter force-pushed the syt/refactor-basename branch from b1b6011 to 7a539df Compare June 26, 2025 03:54
@SoonIter
Copy link
Member Author

There are also some compile-time stages that read the base configuration like plugins, and we can't guarantee that they are correct either if we only modify them at runtime.

For the core package, I can refactor it to no rely on the base. In the future, it may be possible to implement, but some rspress plugins may depend on base configuration, and this feature carries a certain risk of accuracy.

@SoonIter
Copy link
Member Author

close #2321

@SoonIter SoonIter requested review from Timeless0911 June 26, 2025 05:33
@SoonIter SoonIter enabled auto-merge (squash) June 26, 2025 05:33
@SoonIter SoonIter requested a review from JounQin June 26, 2025 06:07
@SoonIter SoonIter merged commit 558b28d into main Jun 26, 2025
12 of 13 checks passed
@SoonIter SoonIter deleted the syt/refactor-basename branch June 26, 2025 06:22
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 this pull request may close these issues.

4 participants