@ngtools/webpack 15.0.0-next.2 → 15.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngtools/webpack",
3
- "version": "15.0.0-next.2",
3
+ "version": "15.0.0-next.3",
4
4
  "description": "Webpack plugin that AoT compiles your Angular components and modules.",
5
5
  "main": "./src/index.js",
6
6
  "typings": "src/index.d.ts",
package/src/ivy/plugin.js CHANGED
@@ -131,7 +131,7 @@ class AngularWebpackPlugin {
131
131
  this.setupCompilation(compilation, compilationState);
132
132
  }
133
133
  catch (error) {
134
- compilation.errors.push(new WebpackError(`Failed to initialize Angular compilation - ${error instanceof Error ? error.message : error}`));
134
+ (0, diagnostics_1.addError)(compilation, `Failed to initialize Angular compilation - ${error instanceof Error ? error.message : error}`);
135
135
  }
136
136
  });
137
137
  }
@@ -37,6 +37,7 @@ exports.WebpackResourceLoader = void 0;
37
37
  const assert_1 = __importDefault(require("assert"));
38
38
  const path = __importStar(require("path"));
39
39
  const vm = __importStar(require("vm"));
40
+ const diagnostics_1 = require("./ivy/diagnostics");
40
41
  const paths_1 = require("./ivy/paths");
41
42
  const inline_resource_1 = require("./loaders/inline-resource");
42
43
  const replace_resources_1 = require("./transformers/replace_resources");
@@ -173,7 +174,7 @@ class WebpackResourceLoader {
173
174
  catch (error) {
174
175
  (0, assert_1.default)(error instanceof Error, 'catch clause variable is not an Error instance');
175
176
  // Use compilation errors, as otherwise webpack will choke
176
- compilation.errors.push(new WebpackError(error.message));
177
+ (0, diagnostics_1.addError)(compilation, error.message);
177
178
  }
178
179
  });
179
180
  });