Update for webpack 4

webpack4
rubenmoya 6 years ago
parent 46e19768e3
commit 1e0d055cca

1
.gitignore vendored

@ -0,0 +1 @@
node_modules

@ -1,7 +1,11 @@
var loaderUtils = require('loader-utils');
var _ = require('lodash');
module.exports = function (source) {
this.cacheable && this.cacheable();
var template = _.template(source, null, this.options.tplSettings);
var options = loaderUtils.getOptions(this);
var template = _.template(source, null, options.tplSettings);
return 'var _ = require(\'underscore\');\nmodule.exports = ' + template;
};

@ -28,5 +28,8 @@
"bump:major": "npm version major",
"bump:minor": "npm version minor",
"postversion": "git push origin master --follow-tags"
},
"dependencies": {
"loader-utils": "^1.1.0"
}
}

Loading…
Cancel
Save