From 9ce060cbd711d40114aec2c766842e93e339c05d Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Tue, 22 Jan 2019 18:15:36 +0700 Subject: [PATCH] add a workaround for `babel-minify` bug, fix #479 --- packages/core-js/modules/es.string.split.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-js/modules/es.string.split.js b/packages/core-js/modules/es.string.split.js index 1a3601c72a7a..a229737accef 100644 --- a/packages/core-js/modules/es.string.split.js +++ b/packages/core-js/modules/es.string.split.js @@ -13,8 +13,8 @@ var arrayPush = [].push; var min = Math.min; var MAX_UINT32 = 0xffffffff; -// eslint-disable-next-line no-new -var SUPPORTS_Y = !fails(function () { new RegExp('x', 'y'); }); +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); // @@split logic require('../internals/fix-regexp-well-known-symbol-logic')(