Skip to content

Commit

Permalink
Allow to pass compiler options
Browse files Browse the repository at this point in the history
  • Loading branch information
ebuster committed Apr 10, 2015
1 parent 580aa55 commit 7b671ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
@@ -1,7 +1,9 @@
var _ = require('lodash');
var loaderUtils = require("loader-utils");

module.exports = function (source) {
this.cacheable && this.cacheable();
var template = _.template(source);
var options = loaderUtils.parseQuery(this.query);
var template = _.template(source, options);
return 'module.exports = ' + template;
};

0 comments on commit 7b671ef

Please sign in to comment.