Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit 4dbd9db

Browse files
authored
Merge pull request #26 from KnisterPeter/webpack-4
fix: update for webpack 4
2 parents 9605725 + e20eac8 commit 4dbd9db

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
var _ = require('lodash');
22
var loaderUtils = require('loader-utils');
33

4+
function getOptions(context) {
5+
if (context.options && context.options.ejsLoader) {
6+
return context.options.ejsLoader;
7+
}
8+
return {};
9+
}
10+
411
module.exports = function(source) {
512
this.cacheable && this.cacheable();
613
var query = loaderUtils.parseQuery(this.query);
7-
var options = this.options.ejsLoader || {};
14+
var options = getOptions(this);
815

916
['escape', 'interpolate', 'evaluate'].forEach(function(templateSetting) {
1017
var setting = query[templateSetting];

0 commit comments

Comments
 (0)