google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.37k stars 1.14k forks source link

Support wildcarded export #878

Open zzo opened 9 years ago

zzo commented 9 years ago

support this valid ES6 module syntax:

third_party/javascript/angular/v2_alpha/v2_0_0_alpha_12/angular2-es6/angular2.es6:4: ERROR - ES6-to-ES3 conversion of 'Wildcard export' is not yet implemented.
export * from './forms';
^

Also strange the command line options were:

... '--language_in=ES6' '--language_out=ES5' ...

But the error message mentions 'ES6-to-ES3 conversion' - not sure what that's all about.

concavelenz commented 9 years ago

I thought that was dropped for ES6. Spec reference?

zzo commented 9 years ago

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports

also present here: http://wiki.ecmascript.org/lib/exe/fetch.php?id=harmony%3Aspecification_drafts&cache=cache&media=harmony:ecma-262_edition_6_03-17-15-releasecandidate3.pdf

ruffiem commented 8 years ago

Any update yet ?

MatrixFrog commented 8 years ago

No, sorry. I would guess we'll probably get to this towards the end of this year.

nosachamos commented 7 years ago

This is becoming more and more of an issue with folks transpiling TS code into ES6 to feed in closure compiler. Submitting PR to have libraries expand their wildcard exports or running my own forks with those changes is now commonplace if you're working with Angular 2/4 and associated libraries, given that these libraries (ng2-toastr, ng-recaptcha, ng2-sharebuttons, etc) all use barrels and export things using wildcards. Would be really great not have to expand these wildcards to feed them into closure.

MatrixFrog commented 7 years ago

I'll try to look into this soon but I make no promises because we are stretched a bit thin these days. Pull requests would be quite welcome.