@angular-devkit/build-webpack 0.803.4 → 0.803.8

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,14 +1,14 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-webpack",
3
- "version": "0.803.4",
3
+ "version": "0.803.8",
4
4
  "description": "Webpack Builder for Architect",
5
5
  "experimental": true,
6
6
  "main": "src/index.js",
7
7
  "typings": "src/index.d.ts",
8
8
  "builders": "builders.json",
9
9
  "dependencies": {
10
- "@angular-devkit/architect": "0.803.4",
11
- "@angular-devkit/core": "8.3.4",
10
+ "@angular-devkit/architect": "0.803.8",
11
+ "@angular-devkit/core": "8.3.8",
12
12
  "rxjs": "6.4.0",
13
13
  "webpack-merge": "4.2.1"
14
14
  },
package/src/utils.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import * as webpack from 'webpack';
9
9
  export interface EmittedFiles {
10
+ id?: string;
10
11
  name?: string;
11
12
  file: string;
12
13
  initial: boolean;
package/src/utils.js CHANGED
@@ -10,18 +10,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  const path = require("path");
11
11
  function getEmittedFiles(compilation) {
12
12
  const files = [];
13
- // entrypoints might have multiple outputs
14
- // such as runtime.js
15
- for (const [name, entrypoint] of compilation.entrypoints) {
16
- const entryFiles = (entrypoint && entrypoint.getFiles()) || [];
17
- for (const file of entryFiles) {
18
- files.push({ name, file, extension: path.extname(file), initial: true });
19
- }
20
- }
21
13
  // adds all chunks to the list of emitted files such as lazy loaded modules
22
- for (const chunk of Object.values(compilation.chunks)) {
14
+ for (const chunk of compilation.chunks) {
23
15
  for (const file of chunk.files) {
24
16
  files.push({
17
+ id: chunk.id.toString(),
25
18
  name: chunk.name,
26
19
  file,
27
20
  extension: path.extname(file),
@@ -20,6 +20,7 @@ export interface WebpackFactory {
20
20
  }
21
21
  export declare type BuildResult = BuilderOutput & {
22
22
  emittedFiles?: EmittedFiles[];
23
+ webpackStats?: webpack.Stats.ToJsonOutput;
23
24
  };
24
25
  export declare function runWebpack(config: webpack.Configuration, context: BuilderContext, options?: {
25
26
  logging?: WebpackLoggingCallback;
@@ -33,6 +33,7 @@ function runWebpack(config, context, options = {}) {
33
33
  log(stats, config);
34
34
  obs.next({
35
35
  success: !stats.hasErrors(),
36
+ webpackStats: stats.toJson(),
36
37
  emittedFiles: utils_1.getEmittedFiles(stats.compilation),
37
38
  });
38
39
  if (!config.watch) {