Closed mydea closed 1 year ago
@Turbo87 @rwjblue sorry for the ping, not sure who's the most actively maintaining this repo. Would be great to get this or https://github.com/ember-cli/broccoli-terser-sourcemap/pull/314 merged
/cc @ember-cli/ember-cli ⬆️
thanks a bunch for working on this! :tada:
Thanks a ton for working on this!!!
🙏 it would be great if we could merge & release this as a patch level release in order for all packages depending on this getting this fix "for free"!
We ran into this here: https://github.com/getsentry/sentry-javascript/issues/9168, where the build failed when source maps & terser were enabled.
The root cause is that the used dependency: https://github.com/lydell/source-map-url is very old, and the regex it uses is not bullet proof. So this code (that some dependency generated):
Was incorrectly matched by the regex, but return an
''
url. Which then in turn messed up this addon, because whilefs.existsSync(sourceMapPath)
passed, it actually pointed to a directory, not a path (because oflet sourceMapPath = path.join(inFileDirname, urls[i]);
, where the url is''
).This PR does two thigns: