Closure-compiler: Support wildcarded export

Created on 18 Mar 2015  路  6Comments  路  Source: google/closure-compiler

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.

ES6 Work In Progress enhancement

Most helpful comment

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

All 6 comments

I thought that was dropped for ES6. Spec reference?

Any update yet ?

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

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agrafix picture agrafix  路  5Comments

Muhammad-Salman-Sheikh picture Muhammad-Salman-Sheikh  路  6Comments

sam6321 picture sam6321  路  3Comments

alexandernst picture alexandernst  路  4Comments

lauraharker picture lauraharker  路  5Comments