jedireza / hapi-react-views

:package: A hapi view engine for React components
MIT License
231 stars 33 forks source link

Layout feature requires JSX file extension #56

Closed abritinthebay closed 8 years ago

abritinthebay commented 8 years ago

Just found this bug in the Layout feature.

const layoutPath = Path.join(renderOpts.layoutPath, renderOpts.layout + '.jsx');

That hardcodes .jsx which... is less than optimal. Thoughts as to a workaround? (not all projects use .jsx as the extension - in fact none of the ones I've worked on - closed or open - do).

Originally I had that variable as a full filename - so without the string concatenation. Thoughts?

abritinthebay commented 8 years ago

If you strongly want to have .jsx as the default... perhaps a layoutExtension option?

jedireza commented 8 years ago

I wonder why I had that in there. I created #57 to resolve this.

wbprice commented 8 years ago

I was also running into this, but #57 fixed it for me. Thanks!