@absolutejs/absolute 0.19.0-beta.734 → 0.19.0-beta.736

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.
@@ -2,10 +2,27 @@ import type { BunPlugin } from 'bun';
2
2
  /**
3
3
  * Bun bundler plugin that runs the Angular Linker on partially compiled
4
4
  * Angular libraries at build time. Converts ɵɵngDeclare* declarations
5
- * into fully AOT-compiled code so @angular/compiler is not shipped to
6
- * the browser.
5
+ * into fully linked code.
7
6
  *
8
- * Uses a disk cache keyed by file content hash — Babel only runs once
9
- * per Angular package version. Subsequent builds are pure file reads.
7
+ * The `linkerJitMode` flag controls whether NgModule definitions retain
8
+ * `declarations`/`exports` (JIT-mode, required when consumer code is
9
+ * runtime-compiled) or strip them (AOT-mode, smaller output but only
10
+ * correct when consumer components have ɵcmp.dependencies baked in by
11
+ * the Angular compiler-cli).
12
+ *
13
+ * In AbsoluteJS dev/HMR, user components are TypeScript-transpiled via
14
+ * `compileAngularFileJIT` and rely on @angular/compiler at runtime —
15
+ * that runtime JIT path reads `NgModule.ɵmod.declarations` to find
16
+ * directives like FormGroupDirective. Linking vendor code in AOT mode
17
+ * (the default) silently breaks dev because declarations get stripped
18
+ * and runtime JIT then can't resolve `[formGroup]`, `[ngIf]`, etc. So
19
+ * dev/HMR builds must use `linkerJitMode: true`. Production AOT builds
20
+ * use `linkerJitMode: false` (matches AOT'd user components).
21
+ *
22
+ * Cache key includes mode so dev and prod artifacts don't collide.
10
23
  */
24
+ export declare const createAngularLinkerPlugin: (linkerJitMode: boolean) => BunPlugin;
25
+ /** Default AOT-mode plugin instance — keep for callers that don't need
26
+ * to choose. Production AOT builds and any callsite that AOT-compiles
27
+ * user components alongside vendor should use this. */
11
28
  export declare const angularLinkerPlugin: BunPlugin;
@@ -1,5 +1,9 @@
1
- /** Build vendor bundles for every @angular/* package the project imports. */
2
- export declare const buildAngularVendor: (buildDir: string, directories?: string[]) => Promise<string[]>;
1
+ /** Build vendor bundles for every @angular/* package the project imports.
2
+ * `linkerJitMode` controls whether NgModule definitions retain their
3
+ * declarations/exports — required when consumer (user) components are
4
+ * runtime-compiled by `@angular/compiler` (dev/HMR via compileAngularFileJIT).
5
+ * Production AOT builds set this to false to match AOT'd user components. */
6
+ export declare const buildAngularVendor: (buildDir: string, directories?: string[], linkerJitMode?: boolean) => Promise<string[]>;
3
7
  export declare const computeAngularVendorPaths: (specifiers?: string[]) => Record<string, string>;
4
8
  /** Async variant that scans source + transitive deps before producing the
5
9
  * vendor path map. Use this when the page-bundle build needs the full set of
package/package.json CHANGED
@@ -336,5 +336,5 @@
336
336
  ]
337
337
  }
338
338
  },
339
- "version": "0.19.0-beta.734"
339
+ "version": "0.19.0-beta.736"
340
340
  }