Added support for passing template options from webpack.
This commit is contained in:
parent
6b63297adc
commit
71a5107eee
4
index.js
4
index.js
@ -2,6 +2,6 @@ var _ = require('lodash');
|
||||
|
||||
module.exports = function (source) {
|
||||
this.cacheable && this.cacheable();
|
||||
var template = _.template(source);
|
||||
return 'module.exports = ' + template;
|
||||
var template = _.template(source, null, this.options.tplSettings);
|
||||
return 'var _ = require(\'lodash\');\nmodule.exports = ' + template;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tpl-loader",
|
||||
"version": "0.1.1",
|
||||
"version": "0.2.0",
|
||||
"description": "Underscore Templates loader for webpack",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user