Skip to content

Commit c259de5

Browse files
atti187Andarist
andauthored
fix(babel): consider path delimeter on windows (#1090)
* 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 <[email protected]>
1 parent 8835dd2 commit c259de5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/babel/src/preflightCheck.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ function helpersTestTransform() {
3434
const mismatchError = (actual, expected, filename) =>
3535
`You have declared using "${expected}" babelHelpers, but transforming ${filename} resulted in "${actual}". Please check your configuration.`;
3636

37-
const inheritsHelperRe = /\/helpers\/(esm\/)?inherits/;
37+
// Revert to /\/helpers\/(esm\/)?inherits/ when Babel 8 gets released, this was fixed in https://github.com/babel/babel/issues/14185
38+
const inheritsHelperRe = /[\\/]+helpers[\\/]+(esm[\\/]+)?inherits/;
3839

3940
export default async function preflightCheck(ctx, babelHelpers, transformOptions) {
4041
const finalOptions = addBabelPlugin(transformOptions, helpersTestTransform);

0 commit comments

Comments
 (0)