@nx/rspack 23.3.0-pr.37068.f95e11e → 23.3.0-rc.0

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/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](<>)
13
13
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
14
14
  [![Join us on the Official Nx Discord Server](https://img.shields.io/discord/1143497901675401286?label=discord)](https://go.nx.dev/community)
15
- [![Nx Sandboxing](https://staging.nx.app/workspaces/62d013ea0852fe0a2df74438/sandbox-badge.svg)](https://nx.dev/docs/features/ci-features/sandboxing)
15
+ [![Hours saved](https://img.shields.io/endpoint?url=https%3A%2F%2Fstaging.nx.app%2Fnx-cloud%2Fbadge%2F62d013ea0852fe0a2df74438%2Fhours-saved.json)](https://nx.dev/nx-cloud)
16
16
 
17
17
  </div>
18
18
 
@@ -90,6 +90,12 @@ async function rspackInitGenerator(tree, schema) {
90
90
  devDependencies['@rspack/dev-server'] =
91
91
  rspackVersions.rspackDevServerVersion;
92
92
  }
93
+ // @nx/rspack depends on sass, which pulls in @parcel/watcher. Its install
94
+ // script only builds from source when npm_config_build_from_source is set,
95
+ // so skip it.
96
+ (0, internal_1.acknowledgeBuildScripts)(tree, (0, devkit_1.detectPackageManager)(tree.root), {
97
+ '@parcel/watcher': false,
98
+ });
93
99
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, keepExistingVersions);
94
100
  tasks.push(installTask);
95
101
  return (0, devkit_1.runTasksInSerial)(...tasks);
@@ -204,14 +204,14 @@ function normalizeOutputPath(outputPath, projectRoot) {
204
204
  * If outputPath is absolute, we need to resolve it relative to the workspaceRoot first.
205
205
  * After that, we can use the relative path to the workspaceRoot token {workspaceRoot} to generate the output path.
206
206
  */
207
- return `{workspaceRoot}/${(0, path_1.relative)(devkit_1.workspaceRoot, (0, path_1.resolve)(devkit_1.workspaceRoot, outputPath))}`;
207
+ return `{workspaceRoot}/${(0, devkit_1.normalizePath)((0, path_1.relative)(devkit_1.workspaceRoot, (0, path_1.resolve)(devkit_1.workspaceRoot, outputPath)))}`;
208
208
  }
209
209
  else {
210
210
  if (outputPath.startsWith('..')) {
211
- return (0, path_1.join)('{workspaceRoot}', (0, path_1.join)(projectRoot, outputPath));
211
+ return (0, devkit_1.joinPathFragments)('{workspaceRoot}', projectRoot, outputPath);
212
212
  }
213
213
  else {
214
- return (0, path_1.join)('{projectRoot}', outputPath);
214
+ return (0, devkit_1.joinPathFragments)('{projectRoot}', outputPath);
215
215
  }
216
216
  }
217
217
  }
@@ -81,6 +81,7 @@ function applyNxIndependentConfig(options, config, rspackCore) {
81
81
  : undefined;
82
82
  config.devtool =
83
83
  options.sourceMap === true ? 'source-map' : options.sourceMap;
84
+ // v1 configs may still carry libraryTarget, which v2's Output type dropped.
84
85
  const existingOutputConfig = config.output;
85
86
  const existingLibraryTarget = existingOutputConfig?.libraryTarget;
86
87
  const existingLibraryType = typeof existingOutputConfig?.library === 'object' &&
@@ -164,6 +165,10 @@ function applyNxIndependentConfig(options, config, rspackCore) {
164
165
  // this needs to be false to allow toplevel variables to be used in the global scope
165
166
  // important especially for module-federation which operates as such
166
167
  module: false,
168
+ // Keeps SWC from hoisting a callback passed in a class field
169
+ // initializer into one binding shared by all instances:
170
+ // https://github.com/swc-project/swc/issues/12380
171
+ compress: { inline: 0, reduce_funcs: false },
167
172
  mangle: {
168
173
  keep_classnames: true,
169
174
  },
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": "23.3.0-pr.37068.f95e11e",
4
+ "version": "23.3.0-rc.0",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",
@@ -127,6 +127,10 @@
127
127
  }
128
128
  },
129
129
  "dependencies": {
130
+ "@nx/devkit": "23.3.0-rc.0",
131
+ "@nx/js": "23.3.0-rc.0",
132
+ "@nx/module-federation": "23.3.0-rc.0",
133
+ "@nx/web": "23.3.0-rc.0",
130
134
  "@phenomnomnominal/tsquery": "~6.2.0",
131
135
  "autoprefixer": "^10.4.9",
132
136
  "browserslist": "^4.26.0",
@@ -149,16 +153,13 @@
149
153
  "style-loader": "^3.3.0",
150
154
  "ts-checker-rspack-plugin": "^1.3.0",
151
155
  "tslib": "^2.3.0",
152
- "webpack": "5.105.2",
153
- "webpack-node-externals": "^3.0.0",
154
- "@nx/devkit": "23.3.0-pr.37068.f95e11e",
155
- "@nx/js": "23.3.0-pr.37068.f95e11e",
156
- "@nx/module-federation": "23.3.0-pr.37068.f95e11e",
157
- "@nx/web": "23.3.0-pr.37068.f95e11e"
156
+ "webpack": "5.109.2",
157
+ "webpack-node-externals": "^3.0.0"
158
158
  },
159
159
  "devDependencies": {
160
- "nx": "23.3.0-pr.37068.f95e11e",
161
- "@nx/nest": "23.3.0-pr.37068.f95e11e"
160
+ "nx": "23.3.0-rc.0",
161
+ "@nx/nest": "23.3.0-rc.0",
162
+ "@rspack/cli": "^2.0.4"
162
163
  },
163
164
  "peerDependencies": {
164
165
  "@rspack/cli": "^1.0.0 || ^2.0.0",
@@ -0,0 +1,18 @@
1
+ <p style="text-align: center;">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
+ <img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
+ </picture>
6
+ </p>
7
+
8
+ {{links}}
9
+
10
+ <hr>
11
+
12
+ # Nx: Smart Monorepos · Fast Builds
13
+
14
+ Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
15
+
16
+ This package is a [Rspack plugin for Nx](https://nx.dev/nx-api/rspack).
17
+
18
+ {{content}}