UNPKG
tpl-loader
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.1
0.1.0
Underscore Templates loader for webpack
github.com/grassator/tpl-loader
grassator/tpl-loader
tpl-loader
/
index.js
8 lines
(6 loc)
•
246 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
var
_ =
require
(
'lodash'
);
module
.
exports
=
function
(
source
) {
this
.
cacheable
&&
this
.
cacheable
();
var
template = _.
template
(source,
null
,
this
.
options
.
tplSettings
);
return
'var _ = require(\'lodash\');\nmodule.exports = '
+ template; };