Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit69a537c

Browse files
committed
minor#19460 [Frontend] Mention configureBabelPresetEnv() (javiereguiluz)
This PR was squashed before being merged into the 5.4 branch.Discussion----------[Frontend] Mention configureBabelPresetEnv()Fixes#19355.Commits-------4f89a00 [Frontend] Mention configureBabelPresetEnv()
2 parents6af6968 +4f89a00 commit69a537c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎frontend/encore/babel.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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
6380
configuration added by Encore.
6481

6582
.. _`Babel`:https://babeljs.io/
83+
.. _`@babel/preset-env configuration options`:https://babeljs.io/docs/babel-preset-env

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp