Skip to content

Commit

Permalink
remove limit
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu authored and nicolo-ribaudo committed Feb 18, 2023
1 parent a91e89e commit d639977
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/babel-core/src/transformation/normalize-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import parser from "../parser";
import cloneDeep from "./util/clone-deep";

const debug = buildDebug("babel:transform:file");
const LARGE_INPUT_SOURCEMAP_THRESHOLD = 3_000_000;

// These regexps are copied from the convert-source-map package,
// but without // or /* at the beginning of the comment.
Expand Down Expand Up @@ -81,15 +80,9 @@ export default function* normalizeFile(
) as any;
const inputMapContent = fs.readFileSync(
path.resolve(path.dirname(options.filename), match[1]),
"utf8",
);
if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) {
debug("skip merging input map > 1 MB");
} else {
inputMap = convertSourceMap.fromJSON(
// todo:
inputMapContent as unknown as string,
);
}
inputMap = convertSourceMap.fromJSON(inputMapContent);
} catch (err) {
debug("discarding unknown file input sourcemap", err);
}
Expand Down

0 comments on commit d639977

Please sign in to comment.