diff --git a/scripts/buildEsm.js b/scripts/buildEsm.js index 2bca5c924a8..b2b77f902b4 100644 --- a/scripts/buildEsm.js +++ b/scripts/buildEsm.js @@ -2,7 +2,7 @@ const fs = require('fs'); const glob = require('glob'); let pkg = process.argv[process.argv.length - 1]; -let regex = /(.*)\.module\.js/g; +let regex = /(.*)\.module\.js(?!.map)/g; if (fs.existsSync(`${pkg}/dist/module.js`)) { let js = fs.readFileSync(`${pkg}/dist/module.js`, 'utf8'); js = js.replace(regex, '$1.mjs');