Skip to content

Commit

Permalink
bug #1176 Added default fallback value for `enableBabelTypeScriptPres…
Browse files Browse the repository at this point in the history
…et` (jennevdmeer)

This PR was merged into the main branch.

Discussion
----------

Added default fallback value for `enableBabelTypeScriptPreset`

The encore config wrapper does not have an optional/default argument fallback for `enableBabelTypeScriptPreset` and thus creates an invalid number of arguments notice when used without any while it does allow it in https://github.com/symfony/webpack-encore/blob/2e044a958dae6e6820aa99706642039ef8dd27cd/lib/WebpackConfig.js#L729

Commits
-------

0769306 Added default fallback value for `enableBabelTypeScriptPreset`
  • Loading branch information
weaverryan committed Jan 9, 2023
2 parents 2e044a9 + 0769306 commit cee78ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ class Encore {
* @param {object} options
* @returns {Encore}
*/
enableBabelTypeScriptPreset(options) {
enableBabelTypeScriptPreset(options = {}) {
webpackConfig.enableBabelTypeScriptPreset(options);

return this;
Expand Down

0 comments on commit cee78ef

Please sign in to comment.