Repository navigation
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
There was a problem hiding this comment.
Thanks! I'm glad we can fix this issue.
However, I wonder if it's necessary to actually add @docusaurus/theme-classic to the dependencies? To an average user it may be confusing why this is needed, because this dependency is kind of hidden in the shareable tsconfig. (And we have a lot of "below average" users that don't use PnP and don't understand how it works!)
| "@types/scheduler" "*" | ||
| csstype "^3.0.2" | ||
|
|
||
| "@types/react@^17": |
There was a problem hiding this comment.
We don't necessarily want to let users use @types/react@17. Does it work if they install @types/react@18 instead?
There was a problem hiding this comment.
Most likely but the template depends on react@^17.0.2 so the types should match that.
There was a problem hiding this comment.
Err, it's also speaking for ourselves. We do use @types/react@18 in our code base (for other strictness it brings) so having duplicates doesn't seem ideal for us. But I see the reason for most others.
It can be "hidden" by having
While that's fair this is an issue with |
|
I see... I'll think about in the coming days about what we shall do. I think we should re-export all types from preset-classic. |
Pre-flight checklist
Motivation
Resolve the type checking errors in the templates by adding undeclared dependencies.
Motivations for the changes made:
JS and TS templates must depend on
@docusaurus/typessince they try toimport from it in
docusaurus.config.js.The TS template must depend on
@docusaurus/theme-classicand@types/nodesince
@tsconfig/docusaurusspecifies that they need to be loaded.The TS template must depend on
@types/reactsince it imports fromreactand also needs to provide it to
@docusaurus/theme-classicfor its types.The
@types/reactresolutionsentry is needed because other@typespackages depend on
@types/react@*which causes duplicated/incompatible types.Test Plan
e2e test should pass.
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
#7521
#6157 (comment)