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

Commit

Permalink
Merge pull request #26 from KnisterPeter/webpack-4
Browse files Browse the repository at this point in the history
fix: update for webpack 4
  • Loading branch information
KnisterPeter committed Mar 1, 2018
2 parents 9605725 + e20eac8 commit 4dbd9db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
var _ = require('lodash');
var loaderUtils = require('loader-utils');

function getOptions(context) {
if (context.options && context.options.ejsLoader) {
return context.options.ejsLoader;
}
return {};
}

module.exports = function(source) {
this.cacheable && this.cacheable();
var query = loaderUtils.parseQuery(this.query);
var options = this.options.ejsLoader || {};
var options = getOptions(this);

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

0 comments on commit 4dbd9db

Please sign in to comment.