-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove source mapping URL from non minified source code #3485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not sure if this was caused by the request in #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 #3465 |
And ui-router/core#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 ui-router/angular#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.
The text was updated successfully, but these errors were encountered: