@angular-devkit/build-angular 17.3.11 → 17.3.13

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,26 +1,26 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "17.3.11",
3
+ "version": "17.3.13",
4
4
  "description": "Angular Webpack Build Facade",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
7
7
  "builders": "builders.json",
8
8
  "dependencies": {
9
9
  "@ampproject/remapping": "2.3.0",
10
- "@angular-devkit/architect": "0.1703.11",
11
- "@angular-devkit/build-webpack": "0.1703.11",
12
- "@angular-devkit/core": "17.3.11",
13
- "@babel/core": "7.24.0",
14
- "@babel/generator": "7.23.6",
15
- "@babel/helper-annotate-as-pure": "7.22.5",
16
- "@babel/helper-split-export-declaration": "7.22.6",
17
- "@babel/plugin-transform-async-generator-functions": "7.23.9",
18
- "@babel/plugin-transform-async-to-generator": "7.23.3",
19
- "@babel/plugin-transform-runtime": "7.24.0",
20
- "@babel/preset-env": "7.24.0",
21
- "@babel/runtime": "7.24.0",
10
+ "@angular-devkit/architect": "0.1703.13",
11
+ "@angular-devkit/build-webpack": "0.1703.13",
12
+ "@angular-devkit/core": "17.3.13",
13
+ "@babel/core": "7.26.10",
14
+ "@babel/generator": "7.26.10",
15
+ "@babel/helper-annotate-as-pure": "7.25.9",
16
+ "@babel/helper-split-export-declaration": "7.24.7",
17
+ "@babel/plugin-transform-async-generator-functions": "7.26.8",
18
+ "@babel/plugin-transform-async-to-generator": "7.25.9",
19
+ "@babel/plugin-transform-runtime": "7.26.10",
20
+ "@babel/preset-env": "7.26.9",
21
+ "@babel/runtime": "7.26.10",
22
22
  "@discoveryjs/json-ext": "0.5.7",
23
- "@ngtools/webpack": "17.3.11",
23
+ "@ngtools/webpack": "17.3.13",
24
24
  "@vitejs/plugin-basic-ssl": "1.1.0",
25
25
  "ansi-colors": "4.1.3",
26
26
  "autoprefixer": "10.4.18",
@@ -62,7 +62,7 @@
62
62
  "tree-kill": "1.2.2",
63
63
  "tslib": "2.6.2",
64
64
  "undici": "6.11.1",
65
- "vite": "5.1.8",
65
+ "vite": "5.4.14",
66
66
  "watchpack": "2.4.0",
67
67
  "webpack": "5.94.0",
68
68
  "webpack-dev-middleware": "6.1.2",
@@ -67,9 +67,6 @@ function execute(options, context, transforms = {}, extensions) {
67
67
  if (options.prebundle && !normalizedOptions.cacheOptions.enabled) {
68
68
  context.logger.warn(`Prebundling has been configured but will not be used because caching has been disabled.`);
69
69
  }
70
- if (options.allowedHosts?.length) {
71
- context.logger.warn(`The "allowedHosts" option will not be used because it is not supported by the "${builderName}" builder.`);
72
- }
73
70
  if (options.publicHost) {
74
71
  context.logger.warn(`The "publicHost" option will not be used because it is not supported by the "${builderName}" builder.`);
75
72
  }
@@ -3,8 +3,7 @@
3
3
  */
4
4
  export interface Schema {
5
5
  /**
6
- * List of hosts that are allowed to access the dev server. This option has no effect when
7
- * using the 'application' or other esbuild-based builders.
6
+ * List of hosts that are allowed to access the dev server.
8
7
  */
9
8
  allowedHosts?: string[];
10
9
  /**
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "allowedHosts": {
75
75
  "type": "array",
76
- "description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders.",
76
+ "description": "List of hosts that are allowed to access the dev server.",
77
77
  "default": [],
78
78
  "items": {
79
79
  "type": "string"
@@ -359,6 +359,7 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
359
359
  strictPort: true,
360
360
  host: serverOptions.host,
361
361
  open: serverOptions.open,
362
+ allowedHosts: serverOptions.allowedHosts,
362
363
  headers: serverOptions.headers,
363
364
  proxy,
364
365
  cors: {
@@ -48,10 +48,7 @@ function createAngularMemoryPlugin(options) {
48
48
  const codeContents = outputFiles.get(relativeFile)?.contents;
49
49
  if (codeContents === undefined) {
50
50
  if (relativeFile.endsWith('/node_modules/vite/dist/client/client.mjs')) {
51
- return {
52
- code: await loadViteClientCode(file),
53
- map: await (0, promises_1.readFile)(file + '.map', 'utf-8'),
54
- };
51
+ return await loadViteClientCode(file);
55
52
  }
56
53
  return;
57
54
  }
@@ -232,13 +229,15 @@ exports.createAngularMemoryPlugin = createAngularMemoryPlugin;
232
229
  */
233
230
  async function loadViteClientCode(file) {
234
231
  const originalContents = await (0, promises_1.readFile)(file, 'utf-8');
235
- const firstUpdate = originalContents.replace('You can also disable this overlay by setting', '');
236
- (0, node_assert_1.default)(originalContents !== firstUpdate, 'Failed to update Vite client error overlay text. (1)');
237
- const secondUpdate = firstUpdate.replace(
238
- // eslint-disable-next-line max-len
239
- '<code part="config-option-name">server.hmr.overlay</code> to <code part="config-option-value">false</code> in <code part="config-file-name">${hmrConfigName}.</code>', '');
240
- (0, node_assert_1.default)(firstUpdate !== secondUpdate, 'Failed to update Vite client error overlay text. (2)');
241
- return secondUpdate;
232
+ const updatedContents = originalContents.replace(`"You can also disable this overlay by setting ",
233
+ h("code", { part: "config-option-name" }, "server.hmr.overlay"),
234
+ " to ",
235
+ h("code", { part: "config-option-value" }, "false"),
236
+ " in ",
237
+ h("code", { part: "config-file-name" }, hmrConfigName),
238
+ "."`, '');
239
+ (0, node_assert_1.default)(originalContents !== updatedContents, 'Failed to update Vite client error overlay text.');
240
+ return updatedContents;
242
241
  }
243
242
  function pathnameWithoutBasePath(url, basePath) {
244
243
  const parsedUrl = new URL(url, 'http://localhost');