Skip to content

Commit

Permalink
Fix build for windows (#37660)
Browse files Browse the repository at this point in the history
Windows' file system can eat my shorts.
  • Loading branch information
jridgewell committed Feb 15, 2022
1 parent 1e82a4d commit 92155aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build-system/common/esbuild-babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ function getEsbuildBabelPlugin(
}

const root = path.dirname(map.path);
const nodeMods = path.normalize('/node_modules/');
const remapped = remapping(
map.text,
(f, ctx) => {
Expand All @@ -146,7 +147,7 @@ function getEsbuildBabelPlugin(
const file = path.join(root, f);
const map = babelMaps.get(file);
if (!map) {
if (file.includes('/node_modules/')) {
if (file.includes(nodeMods)) {
// Excuse node_modules since they may have been marked external
// (and so not processed by babel).
return null;
Expand Down

0 comments on commit 92155aa

Please sign in to comment.