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

5.62 Nav/NavBar typing regression #3821

Closed
mxschmitt opened this issue May 24, 2024 · 3 comments
Closed

5.62 Nav/NavBar typing regression #3821

mxschmitt opened this issue May 24, 2024 · 3 comments

Comments

@mxschmitt
Copy link

What version of rsuite are you using?

5.62

What version of React are you using?

18.3.1

What version of TypeScript are you using (if any)?

5

What browser are you using?

N/A

Describe the Bug

After #3813 components like Navbar don't get recognised as JSX components anymore, because the user's TS cannot resolve ../@types/common.

Expected Behavior

Works.

To Reproduce

https://github.com/mxschmitt/vite-rsuite-v1.62-regression

npm i && npm run build.

Note: 1.62: bad
Note: 1.61: good

@simonguo
Copy link
Member

Hi @mxschmitt

I have discovered this bug, which is caused by not converting the paths in the .d.ts file when building the release. You can temporarily solve it by adding a paths in tsconfig.json.

https://github.com/mxschmitt/vite-rsuite-v1.62-regression/blob/main/tsconfig.json

{
  "compilerOptions": {
    ...
    "paths": {
      "@/internals/*": ["./node_modules/rsuite/esm/internals/*"],
    }
  },
...
}

I've fixed it(#3820) and will release a new version as soon as I can verify it again

@simonguo
Copy link
Member

Fixed in 5.62.1

@mxschmitt
Copy link
Author

mxschmitt commented May 27, 2024

I can confirm its fixed in 5.62.1. Thank you.

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

No branches or pull requests

2 participants