Skip to content

Commit 979ae85

Browse files
ryantdbrandonroberts
authored andcommitted
fix(deps): Updated webpack/loader-utils version to fix deprecation warning (#61)
1 parent 88da2ae commit 979ae85

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"author": "Brandon Roberts",
1919
"license": "MIT",
2020
"dependencies": {
21-
"loader-utils": "^0.2.15"
21+
"loader-utils": "^1.0.2"
2222
},
2323
"bugs": {
2424
"url": "https://github.com/brandonroberts/angular-router-loader/issues"

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function(source, sourcemap) {
99
var loadChildrenRegex = /loadChildren[\s]*:[\s]*['|"](.*?)['|"]/gm;
1010

1111
// parse query params
12-
var query = loaderUtils.parseQuery(this.query);
12+
var query = loaderUtils.getOptions(this) || {};
1313

1414
// get query options
1515
var delimiter = query.delimiter || '#';
@@ -30,7 +30,7 @@ module.exports = function(source, sourcemap) {
3030
// check for query string in loadString
3131
var queryIndex = loadString.lastIndexOf('?');
3232
var hasQuery = queryIndex !== -1;
33-
var loadStringQuery = hasQuery ? loaderUtils.parseQuery(loadString.substr(queryIndex)) : {};
33+
var loadStringQuery = hasQuery ? loaderUtils.getOptions(loadString.substr(queryIndex)) : {};
3434
var sync = !!loadStringQuery.sync;
3535
var chunkName = loadStringQuery.chunkName || undefined;
3636
var isRelativePath = loadString.startsWith('.');

0 commit comments

Comments
 (0)