Skip to content

Commit

Permalink
fix(loader): switch to loaderUtils.getOptions
Browse files Browse the repository at this point in the history
BREAKING CHANGE: switch to loaderUtils getOptions
  • Loading branch information
jantimon committed Jun 3, 2018
1 parent 1b55838 commit a0a0f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function (source) {
// The following part renders the template with lodash as aminimalistic loader
//
// Get templating options
const options = this.query !== '' ? loaderUtils.parseQuery(this.query) : {};
const options = this.query !== '' ? loaderUtils.getOptions(this) : {};
const template = _.template(source, _.defaults(options, { variable: 'data' }));
// Require !!lodash - using !! will disable all loaders (e.g. babel)
return 'var _ = require(' + loaderUtils.stringifyRequest(this, '!!' + require.resolve('lodash')) + ');' +
Expand Down

0 comments on commit a0a0f0d

Please # to comment.