File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,23 @@ cache directory:
4949 # On Unix run this command. On Windows, clear this directory manually
5050 $ rm -rf node_modules/.cache/babel-loader/
5151
52+ If you want to customize the ``preset-env `` configuration, use the ``configureBabelPresetEnv() ``
53+ method to add any of the `@babel/preset-env configuration options `_:
54+
55+ .. code-block :: javascript
56+
57+ // webpack.config.js
58+ // ...
59+
60+ Encore
61+ // ...
62+
63+ .configureBabelPresetEnv ((config ) => {
64+ config .useBuiltIns = ' usage' ;
65+ config .corejs = 3 ;
66+ })
67+ ;
68+
5269 Creating a ``.babelrc `` File
5370----------------------------
5471
@@ -63,3 +80,4 @@ As soon as a ``.babelrc`` file is present, it will take priority over the Babel
6380configuration added by Encore.
6481
6582.. _`Babel` : https://babeljs.io/
83+ .. _`@babel/preset-env configuration options` : https://babeljs.io/docs/babel-preset-env
You can’t perform that action at this time.
0 commit comments