@nx/angular-rspack 22.7.0-beta.12 → 22.7.0-beta.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.
@@ -1 +1 @@
1
- {"version":3,"file":"common-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/common-config.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAQtB,wBAAsB,eAAe,CACnC,iBAAiB,EAAE,oCAAoC,EACvD,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAC/B,UAAU,EAAE,UAAU,iDAoKvB"}
1
+ {"version":3,"file":"common-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/common-config.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAQtB,wBAAsB,eAAe,CACnC,iBAAiB,EAAE,oCAAoC,EACvD,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAC/B,UAAU,EAAE,UAAU,iDA6KvB"}
@@ -61,9 +61,15 @@ async function getCommonConfig(normalizedOptions, i18n, i18nHash, hashFormat) {
61
61
  tsConfig: {
62
62
  configFile: normalizedOptions.tsConfig,
63
63
  },
64
- ...(i18n.shouldInline && normalizedOptions.aot
65
- ? { alias: { '@angular/localize/init': false } }
66
- : {}),
64
+ alias: {
65
+ ...(i18n.shouldInline && normalizedOptions.aot
66
+ ? { '@angular/localize/init': false }
67
+ : {}),
68
+ ...(normalizedOptions.fileReplacements?.reduce((aliases, replacement) => ({
69
+ ...aliases,
70
+ [replacement.replace]: replacement.with,
71
+ }), {}) ?? {}),
72
+ },
67
73
  },
68
74
  resolveLoader: {
69
75
  symlinks: !normalizedOptions.preserveSymlinks,
@@ -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;YAgVV,gBAAgB;CAkC/B"}
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"}
@@ -82,9 +82,9 @@ class AngularRspackPlugin {
82
82
  callback();
83
83
  });
84
84
  compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
85
- // Handle errors thrown by loaders that prevent sealing
85
+ // Handle errors thrown by loaders that prevent sealing (but ignore for watch mode)
86
86
  compilation.hooks.afterSeal.tapAsync(PLUGIN_NAME, (callback) => {
87
- if (compilation.errors.length > 0) {
87
+ if (!watchRunInitialized && compilation.errors.length > 0) {
88
88
  const stats = compilation.getStats();
89
89
  const compilationError = (0, stats_1.statsErrorsToString)(stats.toJson(), (0, get_stats_options_1.getStatsOptions)(tslib_1.__classPrivateFieldGet(this, _AngularRspackPlugin__options, "f").verbose));
90
90
  callback(new Error(compilationError));
@@ -228,7 +228,8 @@ class AngularRspackPlugin {
228
228
  ? { ...defaultStatsOptions, ...configStats }
229
229
  : defaultStatsOptions;
230
230
  (0, stats_1.rspackStatsLogger)(stats, statsOptions);
231
- if (stats.hasErrors()) {
231
+ // Don't forcibly exit the process with errors when in watch mode
232
+ if (!watchRunInitialized && stats.hasErrors()) {
232
233
  process.exit(1);
233
234
  }
234
235
  });
@@ -27,7 +27,7 @@ function findProjectForPath(filePath, projectRootMap) {
27
27
  * Windows may pass Win-style file paths
28
28
  * Ensure filePath is in UNIX-style
29
29
  */
30
- let currentPath = node_path_1.posix.normalize(filePath);
30
+ let currentPath = node_path_1.posix.normalize(filePath.replaceAll('\\', '/'));
31
31
  for (; currentPath != node_path_1.posix.dirname(currentPath); currentPath = node_path_1.posix.dirname(currentPath)) {
32
32
  const p = projectRootMap.get(currentPath);
33
33
  if (p) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular-rspack",
3
- "version": "22.7.0-beta.12",
3
+ "version": "22.7.0-beta.13",
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.0-beta.12",
52
- "@nx/devkit": "22.7.0-beta.12",
51
+ "@nx/angular-rspack-compiler": "22.7.0-beta.13",
52
+ "@nx/devkit": "22.7.0-beta.13",
53
53
  "ansi-colors": "4.1.3",
54
54
  "autoprefixer": "10.4.21",
55
55
  "deepmerge": "^4.3.1",
@@ -127,11 +127,6 @@
127
127
  "^build-native",
128
128
  "angular-rspack-compiler:build"
129
129
  ],
130
- "inputs": [
131
- "default",
132
- "^production",
133
- "{projectRoot}/vitest.config.mts"
134
- ],
135
130
  "options": {
136
131
  "args": [
137
132
  "--passWithNoTests"