Skip to content

Commit

Permalink
fix: namespace code-split moment locale chunks to separate them from …
Browse files Browse the repository at this point in the history
…app chunks (#507)
  • Loading branch information
amcgee authored Feb 19, 2021
1 parent 495eeaf commit cecb3c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adapter/src/utils/useLocale.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const simplifyLocale = locale => {

const setGlobalLocale = locale => {
if (locale !== 'en' && locale !== 'en-us') {
import(`moment/locale/${locale}`).catch(() => {
import(
/* webpackChunkName: "moment-locales/[request]" */ `moment/locale/${locale}`
).catch(() => {
/* ignore */
})
}
Expand Down

0 comments on commit cecb3c2

Please sign in to comment.