paypal / react-engine

a composite render engine for universal (isomorphic) express apps to render both plain react views and react-router views
Apache License 2.0
1.45k stars 130 forks source link

Support ES6 module syntax for React views. #149

Closed cerebrl closed 8 years ago

cerebrl commented 8 years ago

Check for default property on view export in server.js. This helps support TypeScript and Babel users that leverage ES6 modules and the export default syntax.

Note: tested and verified that both regular module.exports = function () {} as well as the new export default function () {} works as expected.

cerebrl commented 8 years ago

Seems to be JSCS style issues that failed the build. Not sure why they failed considering I mimicked the style of all the other comments. I'll fix them in a few to ensure a passing build.

samsel commented 8 years ago

thanks @cerebrl. v3.2.1 is published with this change.

cerebrl commented 8 years ago

Thanks @samsel!