@nx/angular-rspack-compiler 21.6.3 → 21.6.4

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":"build-and-analyze.d.ts","sourceRoot":"","sources":["../../src/compilation/build-and-analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,wBAAsB,eAAe,CACnC,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,EACrD,qBAAqB,EAAE,qBAAqB,iBAgB7C"}
1
+ {"version":3,"file":"build-and-analyze.d.ts","sourceRoot":"","sources":["../../src/compilation/build-and-analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAI/C,wBAAsB,eAAe,CACnC,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,EACrD,qBAAqB,EAAE,qBAAqB,iBA4B7C"}
@@ -2,9 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildAndAnalyze = buildAndAnalyze;
4
4
  const path_1 = require("path");
5
+ const JS_TS_FILE_PATTERN = /\.[cm]?[jt]sx?$/;
5
6
  async function buildAndAnalyze(angularCompilation, typescriptFileCache, javascriptTransformer) {
6
7
  for (const { filename, contents, } of await angularCompilation.emitAffectedFiles()) {
7
8
  const normalizedFilename = (0, path_1.normalize)(filename.replace(/^[A-Z]:/, ''));
9
+ // Skip JavaScript transformation for non-JS/TS files (JSON, CSS, etc.)
10
+ // Let Rspack handle these through its native module rules
11
+ if (!JS_TS_FILE_PATTERN.test(normalizedFilename)) {
12
+ const text = typeof contents === 'string'
13
+ ? contents
14
+ : Buffer.from(contents).toString();
15
+ typescriptFileCache.set(normalizedFilename, text);
16
+ continue;
17
+ }
8
18
  await javascriptTransformer
9
19
  .transformData(normalizedFilename, contents, true, false)
10
20
  .then((contents) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/angular-rspack-compiler",
3
3
  "private": false,
4
- "version": "21.6.3",
4
+ "version": "21.6.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },