Closed adamreisnz closed 7 years ago
Not sure if this was caused by the request in https://github.com/angular-ui/ui-router/issues/2378
Workaround is to strip all comments from the source codes in build process, but still I don't think it should be included by default for non minified source files. The whole point of source maps is to unmangle minified code and make it possible to debug it. Unminified source code is already possible to debug...
Possible duplicate of https://github.com/angular-ui/ui-router/issues/3465
And https://github.com/ui-router/core/pull/58 fixes the problem by including the proper files in the built package and allows you to debug with correct sources as well.
We may take a different approach by embedding the sourcemaps inline into the es5 transpiled code. Please see https://github.com/ui-router/angular/pull/136 and comment
Note: The es5 files would have the sourcemaps embedded. However, when we generate bundles, the sourcemaps would be extracted to external .map files.
Let me know if you anyone has concerns with this approach. I think this should solve for most cases without packaging the source files.
I'm not sure if this alone will fix the problem. Here are my thoughts:
Can I ask why you are reticent to include the source files in the non-minified release?
Oh, right. It looks like this option will inline the sources into the actual target file. If that's the case, then this solution will probably be fine. Though it still needs to be applied to both projects. Thanks for addressing this problem.
This is a:
My version of UI-Router is: 1.0.3
Bug Report
Current Behavior:
The following line is included in the unminified source code of ui-router:
This now causes an error in my chrome console:
This is because I don't include (and don't want to include) the pre-rolled sourcemap for ui-router. I bundle the unminified source code into a vendor package and roll my own sourcemaps from that.
As such, this sourcemapping is redundant and problematic causing dev tools to look for non-existent source maps.
Expected Behavior:
Only include source map reference in the minified code and let developers handle it themselves if they want to use the non-minfied code. Don't include source map in the non-minified code.
Link to Plunker that reproduces the issue:
Cannot be demonstrated in a Plunkr because the source map is provided on the CDN.