Skip to content

Commit eb01ef1

Browse files
author
Artem
committed
Fixes importing only necessary localizations.
1 parent fdb675f commit eb01ef1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gatsby-node.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ exports.onCreateWebpackConfig = ({ actions, plugins }, pluginOptions) => {
2727
GATSBY_INTL_REDIRECT_COMPONENT_PATH: JSON.stringify(redirectComponent),
2828
}),
2929
new webpack.ContextReplacementPlugin(
30-
/react-intl[/\\]locale-data$/,
30+
/@formatjs[/\\]intl-relativetimeformat[/\\]dist[/\\]locale-data$/,
31+
regex
32+
),
33+
new webpack.ContextReplacementPlugin(
34+
/@formatjs[/\\]intl-pluralrules[/\\]dist[/\\]locale-data$/,
3135
regex
3236
),
3337
],

0 commit comments

Comments
 (0)