Skip to content

Commit 934219f

Browse files
comxdjaviereguiluz
authored andcommitted
[Frontend/Encore] Fix code example for ignoring Moment.js Locales
@see https://webpack.js.org/plugins/ignore-plugin/#example-of-ignoring-moment-locales
1 parent 33a075a commit 934219f

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)