Skip to content

Commit 152d6fd

Browse files
author
Vlad Mashkin
committed
Fix the loader
1 parent 506e01c commit 152d6fd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = function (source) {
2020
}
2121

2222
const compiled = _.template(source);
23+
const renderedView = compiled();
2324

24-
return 'module.exports = ' + JSON.stringify(compiled) + ';';
25+
return 'module.exports = function() { return ' + JSON.stringify(renderedView) + '; };';
2526
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lodash-simple-template-loader",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Lodash template loader for Webpack",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)