@angular/build 19.1.0 → 19.1.1

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": "@angular/build",
3
- "version": "19.1.0",
3
+ "version": "19.1.1",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,7 +23,7 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.1901.0",
26
+ "@angular-devkit/architect": "0.1901.1",
27
27
  "@babel/core": "7.26.0",
28
28
  "@babel/helper-annotate-as-pure": "7.25.9",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
@@ -57,7 +57,7 @@
57
57
  "@angular/localize": "^19.0.0",
58
58
  "@angular/platform-server": "^19.0.0",
59
59
  "@angular/service-worker": "^19.0.0",
60
- "@angular/ssr": "^19.1.0",
60
+ "@angular/ssr": "^19.1.1",
61
61
  "less": "^4.2.0",
62
62
  "ng-packagr": "^19.0.0",
63
63
  "postcss": "^8.4.0",
@@ -14,9 +14,11 @@ exports.createAngularMemoryPlugin = createAngularMemoryPlugin;
14
14
  const node_assert_1 = __importDefault(require("node:assert"));
15
15
  const promises_1 = require("node:fs/promises");
16
16
  const node_path_1 = require("node:path");
17
+ const node_url_1 = require("node:url");
17
18
  const load_esm_1 = require("../../../utils/load-esm");
18
19
  const ANGULAR_PREFIX = '/@ng/';
19
20
  const VITE_FS_PREFIX = '/@fs/';
21
+ const FILE_PROTOCOL = 'file:';
20
22
  async function createAngularMemoryPlugin(options) {
21
23
  const { virtualProjectRoot, outputFiles, external } = options;
22
24
  const { normalizePath } = await (0, load_esm_1.loadEsmModule)('vite');
@@ -29,8 +31,16 @@ async function createAngularMemoryPlugin(options) {
29
31
  return;
30
32
  }
31
33
  // For SSR with component HMR, pass through as a virtual module
32
- if (ssr && source.startsWith(ANGULAR_PREFIX)) {
33
- return '\0' + source;
34
+ if (ssr && source.startsWith(FILE_PROTOCOL) && source.includes(ANGULAR_PREFIX)) {
35
+ // Vite will resolve these these files example:
36
+ // `file:///@ng/component?c=src%2Fapp%2Fapp.component.ts%40AppComponent&t=1737017253850`
37
+ const sourcePath = (0, node_url_1.fileURLToPath)(source);
38
+ const { root } = (0, node_path_1.parse)(sourcePath);
39
+ const sourceWithoutRoot = normalizePath('/' + sourcePath.slice(root.length));
40
+ if (sourceWithoutRoot.startsWith(ANGULAR_PREFIX)) {
41
+ const [, query] = source.split('?', 2);
42
+ return `\0${sourceWithoutRoot}?${query}`;
43
+ }
34
44
  }
35
45
  // Prevent vite from resolving an explicit external dependency (`externalDependencies` option)
36
46
  if (external?.includes(source)) {
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = normalizeCacheOptions;
11
11
  const node_path_1 = require("node:path");
12
12
  /** Version placeholder is replaced during the build process with actual package version */
13
- const VERSION = '19.1.0';
13
+ const VERSION = '19.1.1';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&