@angular-devkit/build-webpack 0.1500.0-next.3 → 0.1500.0-next.5

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,13 +1,13 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-webpack",
3
- "version": "0.1500.0-next.3",
3
+ "version": "0.1500.0-next.5",
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.1500.0-next.3",
10
+ "@angular-devkit/architect": "0.1500.0-next.5",
11
11
  "rxjs": "6.6.7"
12
12
  },
13
13
  "peerDependencies": {
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/angular/angular-cli.git"
27
27
  },
28
28
  "engines": {
29
- "node": "^14.15.0 || >=16.10.0",
29
+ "node": "^14.20.0 || ^16.13.0 || >=18.10.0",
30
30
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
31
31
  "yarn": ">= 1.13.0"
32
32
  },
@@ -18,6 +18,7 @@ export declare type DevServerBuildOutput = BuildResult & {
18
18
  address: string;
19
19
  };
20
20
  export declare function runWebpackDevServer(config: webpack.Configuration, context: BuilderContext, options?: {
21
+ shouldProvideStats?: boolean;
21
22
  devServerConfig?: WebpackDevServer.Configuration;
22
23
  logging?: WebpackLoggingCallback;
23
24
  webpackFactory?: WebpackFactory;
@@ -19,6 +19,7 @@ const webpack_1 = __importDefault(require("webpack"));
19
19
  const webpack_dev_server_1 = __importDefault(require("webpack-dev-server"));
20
20
  const utils_1 = require("../utils");
21
21
  function runWebpackDevServer(config, context, options = {}) {
22
+ var _a;
22
23
  const createWebpack = (c) => {
23
24
  if (options.webpackFactory) {
24
25
  const result = options.webpackFactory(c);
@@ -40,16 +41,19 @@ function runWebpackDevServer(config, context, options = {}) {
40
41
  return new webpack_dev_server_1.default(config, webpack);
41
42
  };
42
43
  const log = options.logging || ((stats, config) => context.logger.info(stats.toString(config.stats)));
44
+ const shouldProvideStats = (_a = options.shouldProvideStats) !== null && _a !== void 0 ? _a : true;
43
45
  return createWebpack({ ...config, watch: false }).pipe((0, operators_1.switchMap)((webpackCompiler) => new rxjs_1.Observable((obs) => {
44
46
  var _a;
45
47
  const devServerConfig = options.devServerConfig || config.devServer || {};
46
48
  (_a = devServerConfig.host) !== null && _a !== void 0 ? _a : (devServerConfig.host = 'localhost');
47
49
  let result;
50
+ const statsOptions = typeof config.stats === 'boolean' ? undefined : config.stats;
48
51
  webpackCompiler.hooks.done.tap('build-webpack', (stats) => {
49
52
  // Log stats.
50
53
  log(stats, config);
51
54
  obs.next({
52
55
  ...result,
56
+ webpackStats: shouldProvideStats ? stats.toJson(statsOptions) : undefined,
53
57
  emittedFiles: (0, utils_1.getEmittedFiles)(stats.compilation),
54
58
  success: !stats.hasErrors(),
55
59
  outputPath: stats.compilation.outputOptions.path,