From c259de596228557cc69edbf912fa9a738837a8aa Mon Sep 17 00:00:00 2001 From: Mattias Ekstrand Date: Tue, 22 Feb 2022 23:35:32 +0100 Subject: [PATCH] fix(babel): consider path delimeter on windows (#1090) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(babel): consider path delimeter on windows (#1089) * Fixed lint issues * Added reference to issue in babel * chore: update comment linking to the resolved Babel issue Co-authored-by: Mateusz BurzyƄski --- packages/babel/src/preflightCheck.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/babel/src/preflightCheck.js b/packages/babel/src/preflightCheck.js index ce0660941..be0a20a02 100644 --- a/packages/babel/src/preflightCheck.js +++ b/packages/babel/src/preflightCheck.js @@ -34,7 +34,8 @@ function helpersTestTransform() { const mismatchError = (actual, expected, filename) => `You have declared using "${expected}" babelHelpers, but transforming ${filename} resulted in "${actual}". Please check your configuration.`; -const inheritsHelperRe = /\/helpers\/(esm\/)?inherits/; +// Revert to /\/helpers\/(esm\/)?inherits/ when Babel 8 gets released, this was fixed in https://github.com/babel/babel/issues/14185 +const inheritsHelperRe = /[\\/]+helpers[\\/]+(esm[\\/]+)?inherits/; export default async function preflightCheck(ctx, babelHelpers, transformOptions) { const finalOptions = addBabelPlugin(transformOptions, helpersTestTransform);