8000 [Frontend/Encore] Fix code example for ignoring Moment.js Locales · symfony/symfony-docs@934219f · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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)
0