You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would add a var Handlebars = require('handlebars'); to the compiled template module, so the user doesn't have to require and passthrough the Handlebars library in every module that needs templates.
Current usage:
var Handlebars = require('handlebars');
var Templates = require('./templates')(Handlebars);
Proposed change would allow:
var Templates = require('./templates');
Am I missing something, or would this have a decent use case? I'd be happy to contribute, just wanted to make sure I'm not missing something that already exists.
The text was updated successfully, but these errors were encountered:
This should be a default behavior for commonjs. I'd argue that an option is unnecessary (namespace should probably also default to false for commonjs too).
Is there a reason for not having an auto-require option for Handlebars when using the CommonJS compiled version?
For example:
This would add a
var Handlebars = require('handlebars');
to the compiled template module, so the user doesn't have to require and passthrough the Handlebars library in every module that needs templates.Current usage:
Proposed change would allow:
Am I missing something, or would this have a decent use case? I'd be happy to contribute, just wanted to make sure I'm not missing something that already exists.
The text was updated successfully, but these errors were encountered: