Skip to content

Commit

Permalink
fix: Fix babel build error on windows (microsoft#27406)
Browse files Browse the repository at this point in the history
Modify the change from microsoft#27313 to use path.resolve to ensure the slashes are in the correct direction on Windows.
  • Loading branch information
behowell authored Mar 31, 2023
1 parent f972b0d commit 34d6188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/babel/preset-v9.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function createModuleResolverAliases(options) {
const tsSourceRoot = aliasTuple[0];
const jsSourceRoot = tsSourceRoot.replace('src', 'lib').replace('.ts', '.js');
const aliasRegex = `^${packageName}$`;
acc[aliasRegex] = `${rootOffset}/${jsSourceRoot}`;
acc[aliasRegex] = path.resolve(rootOffset, jsSourceRoot);
return acc;
}, /** @type {Record<string,string>} */ ({}));
}
Expand Down

0 comments on commit 34d6188

Please sign in to comment.