popcodeorg / popcodeorg/popcode
Replace Moment.js with a lighter-weight alternative
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 191
- フォーク
- 143
- 平均マージ
- 4日 11時間
- マージ済み PR(30日)
- 5
説明
Moment.js contributes a disproportionately large proportion of our bundle size given its limited actual use in the application. dayjs is an API-compatible replacement that is much smaller, though we would have to confirm it supports the browsers/versions we need. date-fns is another library that, while not API-compatible, has been much-touted recently as a good replacement for Moment.
To evaluate effectiveness at reducing bundle size, you can build a production-like environment with:
$ PROFILE_BUILD=true npm run preview
And then access:
- http://localhost:3000/profile/bundle-analyzer.html
- http://localhost:3000/profile/webpack-visualizer.html
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず PROFILE_BUILD=true npm run preview を実行し、bundle-analyzer.html と webpack-visualizer.html のページを確認します。次に、現在の Moment.js の使用箇所を特定し、dayjs または date-fns が必要なブラウザーをサポートしているか確認します。Moment.js を適切な代替に置き換え、production bundle のサイズが削減されたことを実証できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend, performance, web-dev
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100