Closed rwjblue closed 6 years ago
Hmm I thought we fixed this. I'll take a look at this during the weekend.
Invalid sourcemap comments don't cause a build error any more but they do generate broken vendor sourcemaps (nothing is mapped)
I'm using the crude approach of https://github.com/andyhot/fastboot-transform/commit/580e205eeee668cecce8bace1427df7f6c95dc7a to get around this.
@rwjblue Would you use a library for stripping the sourcemap comments (didn't find any but didn't search that much) or perhaps a regexp on the last line is fine?
Also, i'm wondering if it makes sense to allow app developers a global switch that turns off this transform (for those not interested in fastboot)
I ended up creating a nice PR for this using the convert-source-map module
Currently the transform emits a wrapper around the input file contents (to guard when running in fastboot mode). Generally speaking this is good, but it has some issues when the input file contains source map comments inline. As of ember-cli-uglify@2.0.0 any invalid sourcemap comments cause a build time error (we should definitely fix ember-cli-uglify to warn instead of error also).
See: