@nx/angular-rspack 22.3.0-canary.20251211-205daee → 22.3.0-canary.20251215-e864b6a

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":"server-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/server-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAA4B,MAAM,cAAc,CAAC;AAE5E,OAAO,KAAK,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAOtB,wBAAsB,eAAe,CACnC,iBAAiB,EAAE,oCAAoC,EACvD,IAAI,EAAE,WAAW,EACjB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,aAAa,CAAC,CAmFxB"}
1
+ {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/server-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAA4B,MAAM,cAAc,CAAC;AAE5E,OAAO,KAAK,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAOtB,wBAAsB,eAAe,CACnC,iBAAiB,EAAE,oCAAoC,EACvD,IAAI,EAAE,WAAW,EACjB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,aAAa,CAAC,CAoFxB"}
@@ -70,6 +70,7 @@ async function getServerConfig(normalizedOptions, i18n, defaultConfig) {
70
70
  ],
71
71
  options: {
72
72
  angularSSRInstalled: (0, misc_helpers_1.isPackageInstalled)(root, '@angular/ssr'),
73
+ isZoneJsInstalled: (0, misc_helpers_1.isPackageInstalled)(root, 'zone.js'),
73
74
  },
74
75
  },
75
76
  ...(defaultConfig.module?.rules ?? []),
@@ -1 +1 @@
1
- {"version":3,"file":"style-config-utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/style-config-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,YAAY,EAElB,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EACV,UAAU,EACV,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAWtB,wBAAsB,eAAe,CACnC,YAAY,EAAE,oCAAoC,EAClD,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAC7B,OAAO,CAAC;IACT,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CA4PD"}
1
+ {"version":3,"file":"style-config-utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/config/config-utils/style-config-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,YAAY,EAElB,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EACV,UAAU,EACV,oCAAoC,EACrC,MAAM,cAAc,CAAC;AAWtB,wBAAsB,eAAe,CACnC,YAAY,EAAE,oCAAoC,EAClD,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAC7B,OAAO,CAAC;IACT,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAoQD"}
@@ -30,8 +30,13 @@ async function getStylesConfig(buildOptions, hashFormat, platform) {
30
30
  ]);
31
31
  const postcssConfiguration = await (0, postcss_configuration_1.loadPostcssConfiguration)(searchDirectories);
32
32
  if (postcssConfiguration) {
33
- for (const [pluginName, pluginOptions] of postcssConfiguration.plugins) {
34
- const { default: plugin } = await Promise.resolve(`${pluginName}`).then(s => tslib_1.__importStar(require(s)));
33
+ const postCssPluginRequire = (0, node_module_1.createRequire)((0, node_path_1.dirname)(postcssConfiguration.configPath) + '/');
34
+ for (const [pluginName, pluginOptions] of postcssConfiguration.config
35
+ .plugins) {
36
+ const pluginModule = postCssPluginRequire(pluginName);
37
+ const plugin = pluginModule.__esModule
38
+ ? pluginModule['default']
39
+ : pluginModule;
35
40
  if (typeof plugin !== 'function' || plugin.postcss !== true) {
36
41
  throw new Error(`Attempted to load invalid Postcss plugin: "${pluginName}"`);
37
42
  }
@@ -1,5 +1,6 @@
1
1
  import { type LoaderContext, type LoaderDefinitionFunction } from '@rspack/core';
2
2
  export default function loader(this: LoaderContext<{
3
3
  angularSSRInstalled: boolean;
4
+ isZoneJsInstalled: boolean;
4
5
  }>, content: string, map: Parameters<LoaderDefinitionFunction>[1]): void;
5
6
  //# sourceMappingURL=platform-server-exports.loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-server-exports.loader.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/loaders/platform-server-exports.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,IAAI,EAAE,aAAa,CAAC;IAAE,mBAAmB,EAAE,OAAO,CAAA;CAAE,CAAC,EACrD,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,QAmB7C"}
1
+ {"version":3,"file":"platform-server-exports.loader.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/loaders/platform-server-exports.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,IAAI,EAAE,aAAa,CAAC;IAClB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC,EACF,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,QAwB7C"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = loader;
4
4
  function loader(content, map) {
5
- const { angularSSRInstalled } = this.getOptions();
5
+ const { angularSSRInstalled, isZoneJsInstalled } = this.getOptions();
6
6
  let source = `${content}
7
7
 
8
8
  // EXPORTS added by @nx/angular-rspack
@@ -13,6 +13,10 @@ function loader(content, map) {
13
13
  export { ɵgetRoutesFromAngularRouterConfig } from '@angular/ssr';
14
14
  `;
15
15
  }
16
+ if (isZoneJsInstalled) {
17
+ source = `import 'zone.js/node';
18
+ ${source}`;
19
+ }
16
20
  this.callback(null, source, map);
17
21
  return;
18
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ng-rspack.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/ng-rspack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGR,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,WAAW,CAAC;AASnB,qBAAa,cAAe,YAAW,oBAAoB;IACzD,QAAQ,CAAC,aAAa,EAAE,oCAAoC,CAAC;IAC7D,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;gBAGzB,aAAa,EAAE,oCAAoC,EACnD,YAAY,EAAE;QACZ,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;QAC/B,WAAW,EAAE,WAAW,CAAC;KAC1B;IAOH,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAgJzB"}
1
+ {"version":3,"file":"ng-rspack.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/ng-rspack.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAGR,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,WAAW,EACX,oCAAoC,EACrC,MAAM,WAAW,CAAC;AASnB,qBAAa,cAAe,YAAW,oBAAoB;IACzD,QAAQ,CAAC,aAAa,EAAE,oCAAoC,CAAC;IAC7D,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;gBAGzB,aAAa,EAAE,oCAAoC,EACnD,YAAY,EAAE;QACZ,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;QAC/B,WAAW,EAAE,WAAW,CAAC;KAC1B;IAOH,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAoJzB"}
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NgRspackPlugin = void 0;
4
- const core_1 = require("@rspack/core");
4
+ const core_1 = require("@angular/core");
5
+ const core_2 = require("@rspack/core");
5
6
  const node_path_1 = require("node:path");
6
7
  const entry_points_1 = require("../config/config-utils/entry-points");
8
+ const misc_helpers_1 = require("../utils/misc-helpers");
7
9
  const angular_rspack_plugin_1 = require("./angular-rspack-plugin");
8
10
  const angular_ssr_dev_server_1 = require("./angular-ssr-dev-server");
9
11
  const i18n_inline_plugin_1 = require("./i18n-inline-plugin");
10
12
  const index_html_plugin_1 = require("./index-html-plugin");
11
- const rxjs_esm_resolution_1 = require("./rxjs-esm-resolution");
12
13
  const progress_plugin_1 = require("./progress-plugin");
13
- const misc_helpers_1 = require("../utils/misc-helpers");
14
+ const rxjs_esm_resolution_1 = require("./rxjs-esm-resolution");
14
15
  class NgRspackPlugin {
15
16
  constructor(pluginOptions, extraOptions) {
16
17
  this.pluginOptions = pluginOptions;
@@ -30,17 +31,21 @@ class NgRspackPlugin {
30
31
  if (!isDevServer && this.pluginOptions.progress) {
31
32
  new progress_plugin_1.ProgressPlugin(this.isPlatformServer ? 'server' : 'browser').apply(compiler);
32
33
  }
33
- new core_1.DefinePlugin({
34
+ new core_2.DefinePlugin({
34
35
  ...(this.pluginOptions.optimization.scripts
35
36
  ? { ngDevMode: 'false' }
36
37
  : {}),
37
- ngJitMode: this.pluginOptions.aot ? undefined : 'true',
38
+ ngJitMode: this.pluginOptions.aot
39
+ ? +core_1.VERSION.major >= 21
40
+ ? 'false'
41
+ : undefined
42
+ : 'true',
38
43
  ngServerMode: this.isPlatformServer,
39
44
  ngHmrMode: this.pluginOptions.devServer?.hmr && isDevServer ? 'true' : 'false',
40
45
  ...(this.pluginOptions.define ?? {}),
41
46
  }).apply(compiler);
42
47
  if (this.pluginOptions.assets && !this.isPlatformServer) {
43
- new core_1.CopyRspackPlugin({
48
+ new core_2.CopyRspackPlugin({
44
49
  patterns: (this.pluginOptions.assets ?? []).map((asset) => {
45
50
  let { input, output = '' } = asset;
46
51
  input = (0, node_path_1.resolve)(root, input).replace(/\\/g, '/');
@@ -14,5 +14,8 @@ export interface SearchDirectory {
14
14
  }
15
15
  export declare function generateSearchDirectories(roots: string[]): Promise<SearchDirectory[]>;
16
16
  export declare function findTailwindConfiguration(searchDirectories: SearchDirectory[]): string | undefined;
17
- export declare function loadPostcssConfiguration(searchDirectories: SearchDirectory[]): Promise<PostcssConfiguration | undefined>;
17
+ export declare function loadPostcssConfiguration(searchDirectories: SearchDirectory[]): Promise<{
18
+ configPath: string;
19
+ config: PostcssConfiguration;
20
+ } | undefined>;
18
21
  //# sourceMappingURL=postcss-configuration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postcss-configuration.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/postcss-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACtD;AAoBD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,eAAe,EAAE,CAAC,CAW5B;AAiBD,wBAAgB,yBAAyB,CACvC,iBAAiB,EAAE,eAAe,EAAE,GACnC,MAAM,GAAG,SAAS,CAEpB;AAWD,wBAAsB,wBAAwB,CAC5C,iBAAiB,EAAE,eAAe,EAAE,GACnC,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAoD3C"}
1
+ {"version":3,"file":"postcss-configuration.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/postcss-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACtD;AAoBD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,eAAe,EAAE,CAAC,CAW5B;AAiBD,wBAAgB,yBAAyB,CACvC,iBAAiB,EAAE,eAAe,EAAE,GACnC,MAAM,GAAG,SAAS,CAEpB;AAWD,wBAAsB,wBAAwB,CAC5C,iBAAiB,EAAE,eAAe,EAAE,GACnC,OAAO,CACN;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,oBAAoB,CAAC;CAC9B,GACD,SAAS,CACZ,CAoDA"}
@@ -73,7 +73,7 @@ async function loadPostcssConfiguration(searchDirectories) {
73
73
  config.plugins.push(element);
74
74
  }
75
75
  }
76
- return config;
76
+ return { configPath, config };
77
77
  }
78
78
  // Normalize plugin object map form
79
79
  const entries = Object.entries(raw.plugins);
@@ -88,5 +88,5 @@ async function loadPostcssConfiguration(searchDirectories) {
88
88
  }
89
89
  config.plugins.push([name, options]);
90
90
  }
91
- return config;
91
+ return { configPath, config };
92
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular-rspack",
3
- "version": "22.3.0-canary.20251211-205daee",
3
+ "version": "22.3.0-canary.20251215-e864b6a",
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.3.0-canary.20251211-205daee",
52
- "@nx/devkit": "22.3.0-canary.20251211-205daee",
51
+ "@nx/angular-rspack-compiler": "22.3.0-canary.20251215-e864b6a",
52
+ "@nx/devkit": "22.3.0-canary.20251215-e864b6a",
53
53
  "ansi-colors": "4.1.3",
54
54
  "autoprefixer": "10.4.21",
55
55
  "deepmerge": "^4.3.1",
@@ -77,13 +77,13 @@
77
77
  "jsonc-eslint-parser": "^2.4.0"
78
78
  },
79
79
  "peerDependencies": {
80
- "@angular/build": ">=19.0.0 <21.0.0",
81
- "@angular/localize": ">=19.0.0 <21.0.0",
82
- "@angular/platform-server": ">=19.0.0 <21.0.0",
83
- "@angular/ssr": ">=19.0.0 <21.0.0",
80
+ "@angular/build": ">= 19.0.0 < 22.0.0",
81
+ "@angular/localize": ">= 19.0.0 < 22.0.0",
82
+ "@angular/platform-server": ">= 19.0.0 < 22.0.0",
83
+ "@angular/ssr": ">= 19.0.0 < 22.0.0",
84
84
  "@rspack/core": ">=1.3.5 <2.0.0",
85
85
  "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
86
- "zone.js": ">=0.14.0 <0.16.0"
86
+ "zone.js": "~0.15.0 || ~0.16.0"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "tailwindcss": {