Skip to content
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

error with minified bundle #353

Closed
djindjic opened this issue Jan 4, 2015 · 10 comments
Closed

error with minified bundle #353

djindjic opened this issue Jan 4, 2015 · 10 comments

Comments

@djindjic
Copy link

djindjic commented Jan 4, 2015

Could you guys @guybedford and @EisenbergEffect take a look to this issue:

In project with aurelia di I have found some strange error after bundling my code with --minify argument. Without bundling or bundle to "not-minified" file everything works correctly. Here is my sample repo to show this behavior:
https://github.com/djindjic/jspm-bundle

jspm command which I use is:

jspm bundle app/app bundle-3.js --inject --minify

Console error:
image

Also, if I comment this line, there is no errors but this is functionality which I need. :)

@guybedford
Copy link
Member

Which line is the issue happening on that is saying Cannot redefine property: name? I guess it would help to know what object it is trying to define name onto.

@djindjic
Copy link
Author

djindjic commented Jan 6, 2015

Have I understood your question right, line in dependency injection code base?
I dont know how to get this line because without minify there is no error thrown but minified throws this exception shown at print screen above.

@guybedford
Copy link
Member

@djindjic if you expand the error you should be able to find the line in the debug trace as the minification includes source maps.

@djindjic
Copy link
Author

djindjic commented Jan 7, 2015

I think there is not this informations. I have publish this on gh pages where you can see this console error:

http://djindjic.github.io/jspm-bundle/

@guybedford
Copy link
Member

That error shows up as being in https://github.com/aurelia/dependency-injection/blob/master/src/util.js#L2.

This seems like a minification bug in that code in aurelia.

@djindjic
Copy link
Author

djindjic commented Jan 7, 2015

Yes its probably aurelia minify bug, but can you tell me how did you get this line from dev tools? I know its so essential, but I dont know to find it

@guybedford
Copy link
Member

I just clicked the error line - http://djindjic.github.io/jspm-bundle/bundle-4.js:1:3749. That goes into the minified source. Clicking the brackets unpacks the source (source maps don't show for direct execution bugs unfortunately). Then I just back-tracked to see the System.register module name the code was in.

@djindjic
Copy link
Author

djindjic commented Jan 9, 2015

thanks for your help.
I don't see brackets which I can click to unpack the source :(
image

@guybedford
Copy link
Member

The curly braces to do this are just to the left of "Line 1, Column 3749".

@djindjic
Copy link
Author

djindjic commented Jan 9, 2015

oh, I see, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants