Skip to content

Commit b1be173

Browse files
committed
minor #15879 [Frontend/Encore] Fix code example for ignoring Moment.js Locales (comxd)
This PR was submitted for the 5.3 branch but it was merged into the 4.4 branch instead. Discussion ---------- [Frontend/Encore] Fix code example for ignoring Moment.js Locales `@see` https://webpack.js.org/plugins/ignore-plugin/#example-of-ignoring-moment-locales Commits ------- 934219f [Frontend/Encore] Fix code example for ignoring Moment.js Locales
2 parents 33a075a + 934219f commit b1be173

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/encore/custom-loaders-plugins.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ to use the `IgnorePlugin`_ (see `moment/moment#2373`_):
5656
Encore
5757
// ...
5858
59-
+ .addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
59+
+ .addPlugin(new webpack.IgnorePlugin({
60+
resourceRegExp: /^\.\/locale$/,
61+
contextRegExp: /moment$/,
62+
}))
6063
;
6164
6265
.. _`handlebars-loader`: https://github.com/pcardune/handlebars-loader

0 commit comments

Comments
 (0)