Don't understand. Why not just use a function?
Convenience. I don't believe it's required
That's a good question. We're actually going to make some related changes that we have been meaning to make that I suspect you will like. We'll get back to you soon.
@andersea It actually hooks into a built-in extension system that's been part of require() since almost the beginning, but it has also been deprecated for nearly as long (require.extensions).
It was originally decided that the added convenience outweighed the risk (#78). However, with the related changes Patrick mentioned, this may be the perfect time to rethink that.
Also, it's not necessary to use the extension, the old way still works without it:
var template = require('marko').load(require.resolve('./path/to/template.marko'));
Thanks for that answers. Closing.
Most helpful comment
That's a good question. We're actually going to make some related changes that we have been meaning to make that I suspect you will like. We'll get back to you soon.