Closed billypon closed 4 years ago
Now, this loader will export a default function for template rendering, like this:
// template.pug div foo
import template from './template.pug'; export default function foo() { return template(); }
But can we export multi functions? like this:
// template.pug block foo div bar
or
// template.pug mixin foo() div bar
then we can use other functions:
import template from './template.pug'; export default function foo() { return template.foo(); }
https://github.com/bluewings/pug-as-jsx-utils/pull/14
@billypon Thanks for a good feature suggestion. I just merged your PR. And you can use it in 1.0.87.
Now, this loader will export a default function for template rendering, like this:
But can we export multi functions? like this:
or
then we can use other functions: