Skip to content

Commit 3be3900

Browse files
Merge pull request #21 from vseventer/task/update-loader-utils
Update loader-utils.
2 parents 39bd42a + f81a421 commit 3be3900

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ module.exports.pitch = function(request) {
1717
var callback = this.async();
1818

1919
var options = loaderUtils.getOptions(this) || {};
20-
var filename = options.name || path.basename(this.resourcePath);
20+
var context = options.context || this.rootContext;
21+
var name = options.name || path.basename(this.resourcePath);
22+
var filename = loaderUtils.interpolateName(this, name, { context: context });
2123
var outputDir = options.path || '.';
2224
var plugins = options.plugins || [];
2325
if (options.inert) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"dependencies": {
2626
"inert-entry-webpack-plugin": "^4.0.0",
27-
"loader-utils": "^1.1.0"
27+
"loader-utils": "^2.0.0"
2828
},
2929
"devDependencies": {
3030
"ava": "^2.4.0",

0 commit comments

Comments
 (0)