Skip to content

Commit d7f78e8

Browse files
oedotmeLFDanLu
andauthored
fix: esm build source mapping url replacement (#6368)
Co-authored-by: Daniel Lu <dl1644@gmail.com>
1 parent e16aa4d commit d7f78e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/buildEsm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs');
22
const glob = require('glob');
33

44
let pkg = process.argv[process.argv.length - 1];
5-
let regex = /(.*)\.module\.js/g;
5+
let regex = /(.*)\.module\.js(?!.map)/g;
66
if (fs.existsSync(`${pkg}/dist/module.js`)) {
77
let js = fs.readFileSync(`${pkg}/dist/module.js`, 'utf8');
88
js = js.replace(regex, '$1.mjs');

0 commit comments

Comments
 (0)