Skip to content

Commit cee78ef

Browse files
committed
bug #1176 Added default fallback value for enableBabelTypeScriptPreset (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`
2 parents 2e044a9 + 0769306 commit cee78ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ class Encore {
12061206
* @param {object} options
12071207
* @returns {Encore}
12081208
*/
1209-
enableBabelTypeScriptPreset(options) {
1209+
enableBabelTypeScriptPreset(options = {}) {
12101210
webpackConfig.enableBabelTypeScriptPreset(options);
12111211

12121212
return this;

0 commit comments

Comments
 (0)