capaj/require-globify

Require without extension only works for JS files

Closed this issue · 1 comments

In my case, I'm requiring Handlebars templates with '.hbs' extension. So it's not working when I try to require them.

So if I have a zoning.hbs file in my template/ directory and I do this

var myTemplates = require('./templates/*.hbs', { hash: true });

I get this

Error: Cannot find module './templates/zoning' from ...

PR incoming

I'll investigate this. Please follow the pull request for the resolution.