Skip to content

Computed properties + uglify #99

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

Closed
kenjiqq opened this issue Jul 21, 2014 · 4 comments
Closed

Computed properties + uglify #99

kenjiqq opened this issue Jul 21, 2014 · 4 comments
Assignees

Comments

@kenjiqq
Copy link

kenjiqq commented Jul 21, 2014

I found an issue with the way computed properties are implemented and the very common library uglify. I guess it might be the same way for any minification library.

When you have a computed block like:

computed: {
  computedField: function (field1, field2) {
    return field1 + field2;
  }
}

it turns into this after being run though uglify

computed:{
  computedField: function(a,b){
    return a+b
  }
}

I think that is a pretty big issue.

@jmdobry
Copy link
Member

jmdobry commented Jul 21, 2014

Yeah not good. I'll have to refactor.

@jmdobry jmdobry self-assigned this Jul 21, 2014
@kenjiqq
Copy link
Author

kenjiqq commented Jul 21, 2014

One way could be to do what angular does with the DI system, have an array with the parameters first

@jmdobry
Copy link
Member

jmdobry commented Jul 21, 2014

That's not a bad idea.

@jmdobry
Copy link
Member

jmdobry commented Jul 21, 2014

Fixed as of 0.10.2.

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

No branches or pull requests

2 participants