Support lodash template's HTML "escape" delimiter (<%- %>)

This commit is contained in:
anjianshi 2016-01-09 10:07:17 +08:00
parent 37e744dd85
commit b3913d0400
1 changed files with 2 additions and 2 deletions

View File

@ -21,5 +21,5 @@ module.exports = function (source) {
// Use underscore for a minimalistic loader
var options = loaderUtils.parseQuery(this.query);
var template = _.template(source, options);
return 'module.exports = ' + template;
};
return 'var _ = require("lodash"); module.exports = ' + template;
};