componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 305 forks source link

component failing with ES6 spread operator #618

Closed mteichtahl closed 9 years ago

mteichtahl commented 9 years ago

When using component to build a custom component which uses the ES6 spread operator I'm receiving the following error which I hope someone may be able to shed some light on. My sense is that component does not yet support the spread operator

Running "exec:component_build" (exec) task

   build : resolved in 32ms
   build : files in 78ms
 error : Error: 

/Volumes/src/jsRouter/js/modules/ui-components/navItem/index.js:39 ...props } = this.props, ^ ParseError: Unexpected token

the code that triggers the error is

Running "exec:component_build" (exec) task

   build : resolved in 32ms
   build : files in 78ms
 error : Error: 

/Volumes/src/jsRouter/js/modules/ui-components/navItem/index.js:39 ...props } = this.props, ^ ParseError: Unexpected token

timaschew commented 9 years ago

I think it's a dup: https://github.com/componentjs/builder-es6-module-to-cjs/issues/1

mteichtahl commented 9 years ago

Antonio

I had a quick look. Very possibly a duplicate but I can't confirm that at the moment.

If related to the transpiler we would need to ensure broad support for ES6 operators.

It would be great if a contributor could validate of this is a dup or not. I'm happy to share my repo of needed for testing.

Sent from my iPhone

On 30 Dec 2014, at 21:09, Anton Wilhelm notifications@github.com wrote:

I think it's a dup: componentjs/builder-es6-module-to-cjs#1

— Reply to this email directly or view it on GitHub.

mteichtahl commented 9 years ago

Thanks all

This was resolved by enabling harmony. Closing this issue