-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #544 Allow to call configureBabel with an external Babel conf…
…iguration (Lyrkan, weaverryan) This PR was squashed before being merged into the master branch (closes #544). Discussion ---------- Allow to call configureBabel with an external Babel configuration This PR fixes #543 by allowing to call `Encore.configureBabel()` even if an external Babel configuration exists. Basically: * `null` (or any falsy value in reality, to keep it simple) is always allowed as a first argument * a warning will be displayed if the first argument is a callback and something like a `.babelrc` file is detected * a warning will be displayed if the second argument contains a non-whitelisted option (ie. not `includeNodeModules`/`exclude`) and something like a `.babelrc` file is detected ```js // Allowed without any warning Encore.configureBabel(null, { includeNodeModules: ['foo'] }); // Displays a warning and the // callback is ignored Encore.configureBabel( () => { /* ... */ } ); // Displays a warning and the // useBuiltIns option is ignored. Encore.configureBabel(null, { useBuiltIns: 'foo', includeNodeModules: ['foo'], }); ``` Commits ------- a9af955 Merge branch 'master' into configure-babel-optional-callback ffe3054 Recommend null instead of false for the first parameter of configureBabel() 644d1ac Allow to call configureBabel with an external Babel configuration
- Loading branch information
Showing
3 changed files
with
65 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters