From 864d52024975c72182d2c553501f9daebfc12e4d Mon Sep 17 00:00:00 2001 From: Xiaoyu Zhai Date: Wed, 1 Mar 2017 16:29:39 +0800 Subject: [PATCH] fix(@ngtools/webpack): Bump loader-utils and use getOptions (#5001) --- package.json | 2 +- packages/@ngtools/webpack/package.json | 2 +- packages/@ngtools/webpack/src/loader.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1a3f4b397ae3..4b907ec5618d 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "karma-webpack": "^2.0.0", "less": "^2.7.2", "less-loader": "^2.2.3", - "loader-utils": "^0.2.16", + "loader-utils": "^1.0.2", "lodash": "^4.11.1", "magic-string": "^0.19.0", "minimatch": "^3.0.3", diff --git a/packages/@ngtools/webpack/package.json b/packages/@ngtools/webpack/package.json index 65ff77e22468..571e60a37f04 100644 --- a/packages/@ngtools/webpack/package.json +++ b/packages/@ngtools/webpack/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "enhanced-resolve": "^3.1.0", - "loader-utils": "^0.2.16", + "loader-utils": "^1.0.2", "magic-string": "^0.19.0", "source-map": "^0.5.6" }, diff --git a/packages/@ngtools/webpack/src/loader.ts b/packages/@ngtools/webpack/src/loader.ts index 8d1751c832fe..eb906d78503c 100644 --- a/packages/@ngtools/webpack/src/loader.ts +++ b/packages/@ngtools/webpack/src/loader.ts @@ -374,7 +374,7 @@ export function ngcLoader(this: LoaderContext & { _compilation: any }) { }) .catch(err => cb(err)); } else { - const options = loaderUtils.parseQuery(this.query); + const options = loaderUtils.getOptions(this) || {}; const tsConfigPath = options.tsConfigPath; const tsConfig = ts.readConfigFile(tsConfigPath, ts.sys.readFile);