-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
chore(docs): use Vite to build docs site #5333
chore(docs): use Vite to build docs site #5333
Conversation
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.
✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!
What to expect from this code review:
- Comments posted to any areas of potential concern or improvement.
- Detailed feedback or actions needed to resolve issues that are found.
- Turnaround times vary, but we aim to be swift.
@paolostyle you can click here to see the review status or cancel the code review job.
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.
PullRequest Breakdown
Reviewable lines of change
+ 258
- 242
78% JavaScript
11% HTML
9% JSON
2% Other
Generated lines of change
+ 3,330
- 11,880
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
] | ||
"start": "vite", | ||
"build": "vite build", | ||
"lint": "eslint .", |
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.
We should probably call this somewhere in the CI script as well
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.
Add to .github/workflows/build-docs-site.yml
- name: Run linter
run: yarn --cwd docs-site lint
Confirmed the docs site still works with Vite. Nice contribution! |
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.
Description
Problem
The docs site is using long deprecated create-react-app. This PR replaces the build system with Vite, a faster and more modern tool. It also automatically links
react-datepicker
to the local version instead of relying on Webpack's janky path rewrites. A nice bonus of this change is that it fixed the visual glitch of the datepicker's dropdown appearing at the top left corner of the browser for a split second.Changes
react-scripts
with Vitedependencies
, relying on transitive dependencies)Contribution checklist