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

chore(docs): use Vite to build docs site #5333

Merged

Conversation

paolostyle
Copy link
Contributor

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

  • replaces react-scripts with Vite
  • adds missing dependencies to the dependency list (these were all used before, they just weren't listed in dependencies, relying on transitive dependencies)

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

Copy link

@pullrequest pullrequest bot left a 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.

Copy link

@pullrequest pullrequest bot left a 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 .",
Copy link
Member

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

Copy link
Member

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

@martijnrusschen
Copy link
Member

Confirmed the docs site still works with Vite. Nice contribution!

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work here. I don't have any concerns with these changes.

Image of Graham C Graham C


Reviewed with ❤️ by PullRequest

@martijnrusschen martijnrusschen merged commit 2cff74b into Hacker0x01:main Jan 21, 2025
4 checks passed
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.

2 participants