bradwestfall / bradwestfall/house-rules

Reduce bundle size

Open
#3 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

With the introduction of date validation, house-rules gained weight dramatically (due to Moment.js).
![screen shot 2018-03-01 at 9 28 02 am](https://user-images.githubusercontent.com/4910001/36856402-2e053134-1d33-11e8-9347-34cca43303cb.png)

Can we do something about this?

- How about replacing moment with something lightweight, such as [date-fns](https://github.com/date-fns/date-fns) or [Luxon](http://moment.github.io/luxon/)?
- Is date-specific dependency even necessary? It looks like validator already implements `isAfter` and `isBefore` methods.
- Can we make date validation opt-in?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the date-validation code and the Moment.js dependency in house-rules, then inspect how the bundle is produced and measured. Compare the proposed alternatives and whether validator's isAfter/isBefore methods cover the current behavior. Done means agreeing on a concrete approach that reduces the bundle while preserving date validation, including whether it should be opt-in.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.