Skip to content

Commit a07238c

Browse files
committed
Add an example of calling configureBabel with the "include_node_modules" option
1 parent 714a732 commit a07238c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,15 @@ class Encore {
640640
* Encore.configureBabel(function(babelConfig) {
641641
* // change the babelConfig
642642
* }, {
643-
* // set optional Encore-specific options
644-
* // exclude: /(node_modules|bower_components)/
643+
* // set optional Encore-specific options, for instance:
644+
*
645+
* // change the rule that determines which files
646+
* // won't be processed by Babel
647+
* exclude: /bower_components/
648+
*
649+
* // ...or keep the default rule but only allow
650+
* // *some* Node modules to be processed by Babel
651+
* include_node_modules: ['foundation-sites']
645652
* });
646653
*
647654
* Supported options:

0 commit comments

Comments
 (0)