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

fix: remove date-fns as external package #5128

Open
wants to merge 1 commit into
base: fix-website
Choose a base branch
from

Conversation

johannrp27
Copy link


name: fix: remove date-fns as external package
about: Update of date-fns library from 3.6 to 4.1 was running into a issue with current rollup configuration
title: Remove date-fns as external package
labels: ""
assignees: "martijnrusschen"

Description

Linked issue: #5108

Problem
Get back online page with latest version of date-fns

Changes
Rollup issue remove

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.

@johannrp27 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

+ 0
- 20

100% JavaScript

Type of change

Fix - These changes are likely to be fixing a bug or issue.

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.

Looks like a welcome removal of cruft - nothing blocking.

Image of Jacques Jacques


Reviewed with ❤️ by PullRequest

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.

We shouldn't necessarily remove this just because it is causing issues.

Could you please specify the before/after bundle size in the PR description from making these changes? It is possible that it negatively impacts bundle size to remove those entries.

By the way, these changes don't actually remove date-fns as an external dependency. It just removes the tree-shakable approach where we specify every date-fns module.

...Object.keys(pkg.dependencies || {}) still includes date-fns. So it is worth noting that every package inside of dependencies and peerDependencies is marked as external, and that is intentional. Specifying each module of date-fns allowed us to improve bundle size for date-fns modules that were not being used by ensuring they don't get included.

Image of Ryan Ryan


Reviewed with ❤️ by PullRequest

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.

We shouldn't necessarily remove this just because it is causing issues.

Could you please specify the before/after bundle size in the PR description from making these changes? It is possible that it negatively impacts bundle size to remove those entries.

By the way, these changes don't actually remove date-fns as an external dependency. It just removes the tree-shakable approach where we specify every date-fns module.

...Object.keys(pkg.dependencies || {}) still includes date-fns. So it is worth noting that every package inside of dependencies and peerDependencies is marked as external, and that is intentional. Specifying each module of date-fns allowed us to improve bundle size for date-fns modules that were not being used by ensuring they don't get included.

Having said that, if a quick fix is desired to get the website back online, this should work. But we should ensure that the resulting package is not published until a root cause and proper fix have been determined.

Image of Ryan Ryan

@johannrp27
Copy link
Author

Yes, you're right. This fix increases the bundle size a lot. I'll look into it and tell you. Thanks for the observation

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.

1 participant