Skip to content

Commit d7c27c4

Browse files
committed
minor #11051 Uncomment some code in the "Configuring Babel" example (Lyrkan)
This PR was merged into the 3.4 branch. Discussion ---------- Uncomment some code in the "Configuring Babel" example This PR uncomment some lines of code in the `Encore.configureBabel(...)` example based on a feedback given in symfony/webpack-encore#528 (comment). Commits ------- ec6f46b Uncomment some code in "Configuring Babel"
2 parents d983ec4 + ec6f46b commit d7c27c4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

frontend/encore/babel.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ Need to extend the Babel configuration further? The easiest way is via
1818
1919
.configureBabel(function(babelConfig) {
2020
// add additional presets
21-
// babelConfig.presets.push('@babel/preset-flow');
21+
babelConfig.presets.push('@babel/preset-flow');
2222
2323
// no plugins are added by default, but you can add some
24-
// babelConfig.plugins.push('styled-jsx/babel');
24+
babelConfig.plugins.push('styled-jsx/babel');
2525
}, {
2626
// node_modules is not processed through Babel by default
2727
// but you can whitelist specific modules to process
28-
// include_node_modules: ['foundation-sites']
28+
include_node_modules: ['foundation-sites'],
2929
30-
// or completely control the exclude
31-
// exclude: /bower_components/
30+
// or completely control the exclude rule (note that you
31+
// can't use both "include_node_modules" and "exclude" at
32+
// the same time)
33+
exclude: /bower_components/
3234
})
3335
;
3436

0 commit comments

Comments
 (0)