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

append filename to errors thrown from UglifyJS. #4

Merged
merged 1 commit into from
Jun 7, 2015

Conversation

stefanpenner
Copy link
Collaborator

When options contains fromString: true, Uglify chooses ‘?’ to represent the filename, which clearly isn’t of any value. So we just append it, for ember-cli's writeError to correctly print.

…s fromString: true, Uglify chooses ‘?’ to represent the filename, which clearly isn’t of any value.
@stefanpenner stefanpenner changed the title append filename to errors thrown from UglifyJS. While options contain… append filename to errors thrown from UglifyJS. May 21, 2015
ef4 added a commit that referenced this pull request Jun 7, 2015
append filename to errors thrown from UglifyJS.
@ef4 ef4 merged commit 8789465 into ember-cli:master Jun 7, 2015
@ef4
Copy link
Collaborator

ef4 commented Jun 7, 2015

Shipped in 1.0.0.

@stefanpenner
Copy link
Collaborator Author

danke

@SSS2557
Copy link
Contributor

SSS2557 commented Jun 11, 2015

Hello :)

This requires a slight change.

'?' is still considered a string, so we will not see the actual filename printed on the console.

hence we need something like:

e.filename = e.filename || relativePath;
e.filename = (e.filename === '?') ? relativePath : e.filename;

@blisst
Copy link

blisst commented Jun 23, 2015

Is there any workaround for this? I have been unable to get my ember-cli app to do a production build for a while now. It builds fine in development.

Build failed.
File: ? (1:7)
Unexpected token: name (es)

@stefanpenner
Copy link
Collaborator Author

@blisst #6 has been released

@blisst
Copy link

blisst commented Jun 23, 2015

Yayyyyy thank you so much!

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

Successfully merging this pull request may close these issues.

5 participants