Update for webpack 4
This commit is contained in:
parent
46e19768e3
commit
1e0d055cca
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
6
index.js
6
index.js
@ -1,7 +1,11 @@
|
|||||||
|
var loaderUtils = require('loader-utils');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
|
||||||
module.exports = function (source) {
|
module.exports = function (source) {
|
||||||
this.cacheable && this.cacheable();
|
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;
|
return 'var _ = require(\'underscore\');\nmodule.exports = ' + template;
|
||||||
};
|
};
|
||||||
|
@ -28,5 +28,8 @@
|
|||||||
"bump:major": "npm version major",
|
"bump:major": "npm version major",
|
||||||
"bump:minor": "npm version minor",
|
"bump:minor": "npm version minor",
|
||||||
"postversion": "git push origin master --follow-tags"
|
"postversion": "git push origin master --follow-tags"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"loader-utils": "^1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user