Open nippur72 opened 8 years ago
This would be awesome. Right now it's wonky importing stateless components with es6 imports.
export * as PromoError from './PromoError/promoErrorModal.rt.js';
export PromoInfo from './PromoInfo/PromoInfoModal';
export * as PromoSuccess from './PromoSuccess/promoSuccessModal.rt.js';
Edit: The above ended up not even working for my use case as I am using Component.displayName
or Component.name
to render the proper component in my HOC.
Currently
react-templates
exports the generated function as a "whole" module object as the only option. It can't export as named member or asdefault
. There is also inconsistency with the command line option--name
that works only in the case of global and AMD, but not commonjs.I propose to:
--name
option to cover the commonjs case.<rt-export>
tag that allows to specify the name of the export (eventually overriding the--name
).E.g.
Also: