diff --git a/package-lock.json b/package-lock.json index 4ee219d..2b3b81f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3977,12 +3977,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3997,17 +3999,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4124,7 +4129,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4136,6 +4142,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4150,6 +4157,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4157,12 +4165,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4181,6 +4191,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4261,7 +4272,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4273,6 +4285,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4394,6 +4407,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/src/main.ts b/src/main.ts index f575ab0..812c1b8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -119,12 +119,12 @@ export default class WebpackInjectPlugin { this.options = { entryName: (options && options.entryName) || undefined, entryOrder: (options && options.entryOrder) || ENTRY_ORDER.NotLast, - loaderID: (options && options.loaderID) || getUniqueID(), + loaderID: (options && options.loaderID) || getUniqueID() }; } apply(compiler: Compiler) { - const id = this.options.loaderID; + const id = this.options.loaderID!; const newEntry = path.resolve(__dirname, `${FAKE_LOADER_NAME}?id=${id}!`); registry[id] = this.loader;