@nx/rspack 20.3.0 → 20.3.2

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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2024 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2025 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "20.3.0",
4
+ "version": "20.3.2",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "20.3.0",
28
- "@nx/devkit": "20.3.0",
29
- "@nx/web": "20.3.0",
30
- "@nx/module-federation": "20.3.0",
27
+ "@nx/js": "20.3.2",
28
+ "@nx/devkit": "20.3.2",
29
+ "@nx/web": "20.3.2",
30
+ "@nx/module-federation": "20.3.2",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.1.5",
33
33
  "@rspack/dev-server": "^1.0.9",
@@ -55,8 +55,8 @@
55
55
  "webpack-node-externals": "^3.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "@module-federation/enhanced": "~0.7.6",
59
- "@module-federation/node": "~2.6.11"
58
+ "@module-federation/enhanced": "^0.8.8",
59
+ "@module-federation/node": "^2.6.21"
60
60
  },
61
61
  "nx-migrations": {
62
62
  "migrations": "./migrations.json"
@@ -34,7 +34,7 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
34
34
  if (options.index && options.generateIndexHtml) {
35
35
  plugins.push(new core_1.HtmlRspackPlugin({
36
36
  template: options.index,
37
- sri: 'sha256',
37
+ sri: options.subresourceIntegrity ? 'sha256' : undefined,
38
38
  ...(options.baseHref ? { base: { href: options.baseHref } } : {}),
39
39
  ...(config.output?.scriptType === 'module'
40
40
  ? { scriptLoading: 'module' }
@@ -188,6 +188,10 @@ export interface NxAppRspackPluginOptions {
188
188
  * External stylesheets that will be included with the application.
189
189
  */
190
190
  styles?: Array<ExtraEntryPointClass | string>;
191
+ /**
192
+ * Enables the use of subresource integrity validation.
193
+ */
194
+ subresourceIntegrity?: boolean;
191
195
  /**
192
196
  * Override the `target` option in rspack configuration. This setting is not recommended and exists for backwards compatibility.
193
197
  */
@@ -81,6 +81,7 @@ function normalizeOptions(options) {
81
81
  sourceMap: combinedPluginAndMaybeExecutorOptions.sourceMap ?? !isProd,
82
82
  sourceRoot,
83
83
  styles: combinedPluginAndMaybeExecutorOptions.styles ?? [],
84
+ subresourceIntegrity: combinedPluginAndMaybeExecutorOptions.subresourceIntegrity ?? false,
84
85
  target: combinedPluginAndMaybeExecutorOptions.target ?? 'web',
85
86
  targetName,
86
87
  vendorChunk: combinedPluginAndMaybeExecutorOptions.vendorChunk ?? !isProd,