Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #
這個 PR 是?
等公司資料合併上線後再來 merge
將比較大包的 js 拆分成小包,僅當需要使用的時候才讀取
PR 改動:
背景知識
這個套件是透過 https://loadable-components.com/ 來達成 dynamic import
新版的 react 應該會支援更好,但我們還沒升級
我應該從何看起?
請見 comment
我應該如何手動測試?
setup:
npm run build
,npm run start-production
(目的是看 build 後的 request)附錄1
拜訪 http://localhost:3000/companies
可以發現只讀取 bundle.85b12935.js