Skip to content

Commit

Permalink
Merge pull request #1 from assertible/wip-parse-query-get-options
Browse files Browse the repository at this point in the history
Use loader-utils getOptions instead of parseQuery
  • Loading branch information
CodyReichert authored Nov 17, 2017
2 parents 47b57c5 + d5251df commit 69ca40e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ module.exports = function(content) {
if(!this.emitFile)
throw new Error("emitFile is required from module system");

var query = loaderUtils.parseQuery(this.query);
var url = loaderUtils.interpolateName(this, query.name || "[hash].[ext]", {
context: query.context || this.options.context,
var options = loaderUtils.getOptions(this);
var url = loaderUtils.interpolateName(this, options.name || "[hash].[ext]", {
context: options.context || this.options.context,
content: content,
regExp: query.regExp
regExp: options.regExp
});
this.emitFile(url, content);
return content
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "move-file-loader",
"version": "0.0.4",
"version": "0.0.5",
"license": "MIT",
"description": "A Webpack loader to move files from one location to another and return the contents.",
"main": "index.js",
Expand Down

0 comments on commit 69ca40e

Please sign in to comment.