@nx/angular-rspack 22.7.6 → 22.7.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.
@@ -1 +1 @@
1
- {"version":3,"file":"angular-rspack-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/angular-rspack-plugin.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,oCAAoC,EAC1C,MAAM,WAAW,CAAC;AAUnB,qBAAa,mBAAoB,YAAW,oBAAoB;;gBAU5D,OAAO,EAAE,oCAAoC,EAC7C,WAAW,CAAC,EAAE,WAAW;IAuB3B,KAAK,CAAC,QAAQ,EAAE,QAAQ;YAiVV,gBAAgB;CAkC/B"}
1
+ {"version":3,"file":"angular-rspack-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/angular-rspack-plugin.ts"],"names":[],"mappings":"AAiBA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,oCAAoC,EAC1C,MAAM,WAAW,CAAC;AAUnB,qBAAa,mBAAoB,YAAW,oBAAoB;;gBAU5D,OAAO,EAAE,oCAAoC,EAC7C,WAAW,CAAC,EAAE,WAAW;IAuB3B,KAAK,CAAC,QAAQ,EAAE,QAAQ;YAuWV,gBAAgB;CAkC/B"}
@@ -233,6 +233,25 @@ class AngularRspackPlugin {
233
233
  process.exit(1);
234
234
  }
235
235
  });
236
+ // Dispose the shared component stylesheet bundler after a one-shot build so
237
+ // its esbuild service (a child process and sockets, with @angular/build >=
238
+ // 21.2.14) is released and `rspack build` can exit. Safe per-compiler: an
239
+ // SSR build runs the server compiler after the browser one
240
+ // (`dependencies: ['browser']`), never concurrently, and `setupCompilation`
241
+ // lazily recreates the singleton if a later compiler needs it again. Watch
242
+ // builds keep the bundler for incremental rebuilds and tear it down on
243
+ // process shutdown instead.
244
+ compiler.hooks.done.tapAsync(`${PLUGIN_NAME}_cleanup`, async (_stats, callback) => {
245
+ if (!watchRunInitialized) {
246
+ try {
247
+ await (0, angular_rspack_compiler_1.disposeComponentStylesheetBundler)();
248
+ }
249
+ catch {
250
+ // Best-effort cleanup - never fail an otherwise successful build.
251
+ }
252
+ }
253
+ callback();
254
+ });
236
255
  compiler.hooks.normalModuleFactory.tap(PLUGIN_NAME, (normalModuleFactory) => {
237
256
  normalModuleFactory.hooks.beforeResolve.tap(PLUGIN_NAME, (data) => {
238
257
  if (data.request.startsWith('angular:jit:')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular-rspack",
3
- "version": "22.7.6",
3
+ "version": "22.7.8",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -48,8 +48,8 @@
48
48
  "@ampproject/remapping": "2.3.0",
49
49
  "@babel/core": "7.28.3",
50
50
  "@discoveryjs/json-ext": "0.6.3",
51
- "@nx/angular-rspack-compiler": "22.7.6",
52
- "@nx/devkit": "22.7.6",
51
+ "@nx/angular-rspack-compiler": "22.7.8",
52
+ "@nx/devkit": "22.7.8",
53
53
  "ansi-colors": "4.1.3",
54
54
  "autoprefixer": "10.4.21",
55
55
  "deepmerge": "^4.3.1",