@nx/rspack 23.2.0-beta.7 → 23.2.0-beta.9

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.
@@ -12,6 +12,8 @@ export declare function getCommonLoadersForCssModules(options: any, includePaths
12
12
  modules: {
13
13
  mode: string;
14
14
  getLocalIdent: typeof getCSSModuleLocalIdent;
15
+ namedExport: boolean;
16
+ exportLocalsConvention: string;
15
17
  };
16
18
  importLoaders: number;
17
19
  implementation?: undefined;
@@ -24,6 +24,11 @@ function getCommonLoadersForCssModules(options, includePaths, cssExtractLoader)
24
24
  modules: {
25
25
  mode: 'local',
26
26
  getLocalIdent: get_css_module_local_ident_1.getCSSModuleLocalIdent,
27
+ // css-loader 7 defaults namedExport to true, and to camel-case-only
28
+ // locals when it is off. Generated components import the default
29
+ // export and reference class names as authored, so pin both.
30
+ namedExport: false,
31
+ exportLocalsConvention: 'asIs',
27
32
  },
28
33
  importLoaders: 1,
29
34
  },
@@ -13,8 +13,9 @@ exports.handleUnknownExecutors = handleUnknownExecutors;
13
13
  exports.determineFrameworkAndTarget = determineFrameworkAndTarget;
14
14
  exports.determineMain = determineMain;
15
15
  exports.determineTsConfig = determineTsConfig;
16
+ const internal_1 = require("@nx/devkit/internal");
16
17
  const devkit_1 = require("@nx/devkit");
17
- const internal_1 = require("@nx/js/internal");
18
+ const internal_2 = require("@nx/js/internal");
18
19
  const has_plugin_1 = require("./has-plugin");
19
20
  function findExistingTargetsInProject(targets, userProvidedTargets) {
20
21
  const output = {
@@ -129,7 +130,7 @@ function addOrChangeBuildTarget(tree, options, target) {
129
130
  if (tree.exists((0, devkit_1.joinPathFragments)(project.root, 'src/assets'))) {
130
131
  assets.push((0, devkit_1.joinPathFragments)(project.root, 'src/assets'));
131
132
  }
132
- const isTsSolutionSetup = (0, internal_1.isUsingTsSolutionSetup)(tree);
133
+ const isTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)(tree);
133
134
  const buildOptions = {
134
135
  target: options.target ?? 'web',
135
136
  outputPath: isTsSolutionSetup
@@ -441,13 +442,9 @@ async function handleUnsupportedUserProvidedTargetsErrors(userProvidedTargetName
441
442
  Please note that converting a potentially non-compatible project to use Vite may result in unexpected behavior. Always commit
442
443
  your changes before converting a project to use Vite, and test the converted project thoroughly before deploying it.
443
444
  `);
444
- const { Confirm } = require('enquirer');
445
- const prompt = new Confirm({
446
- name: 'question',
445
+ const shouldConvert = await (0, internal_1.confirmationPrompt)({
447
446
  message: `Should we convert the ${validFoundTargetName} target to use the @nx/rspack:${executor} executor?`,
448
- initial: true,
449
447
  });
450
- const shouldConvert = await prompt.run();
451
448
  if (!shouldConvert) {
452
449
  throw new Error(`The ${target} target ${userProvidedTargetName} cannot be converted to use the @nx/rspack:${executor} executor.
453
450
  Please try again, either by providing a different ${target} target or by not providing a target at all (Nx will
@@ -470,13 +467,9 @@ async function handleUnknownExecutors(projectName) {
470
467
  If you still want to convert your project to use the @nx/rspack executors,
471
468
  please make sure to commit your changes before running this generator.
472
469
  `);
473
- const { Confirm } = require('enquirer');
474
- const prompt = new Confirm({
475
- name: 'question',
470
+ const shouldConvert = await (0, internal_1.confirmationPrompt)({
476
471
  message: `Should Nx convert your project to use the @nx/rspack executors?`,
477
- initial: true,
478
472
  });
479
- const shouldConvert = await prompt.run();
480
473
  if (!shouldConvert) {
481
474
  throw new Error(`
482
475
  Nx could not verify that the executors you are using can be converted to the @nx/rspack executors.
@@ -485,7 +478,7 @@ async function handleUnknownExecutors(projectName) {
485
478
  }
486
479
  }
487
480
  function determineFrameworkAndTarget(tree, options, projectRoot, targets) {
488
- (0, internal_1.ensureTypescript)();
481
+ (0, internal_2.ensureTypescript)();
489
482
  const { ast, query } = require('@phenomnomnominal/tsquery');
490
483
  // First try to infer if the target is node
491
484
  if (options.target !== 'node') {
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.2.0-beta.7",
4
+ "version": "23.2.0-beta.9",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",
@@ -130,8 +130,7 @@
130
130
  "@phenomnomnominal/tsquery": "~6.2.0",
131
131
  "autoprefixer": "^10.4.9",
132
132
  "browserslist": "^4.26.0",
133
- "css-loader": "^6.4.0",
134
- "enquirer": "~2.3.6",
133
+ "css-loader": "^7.1.4",
135
134
  "express": "^4.21.2",
136
135
  "http-proxy-middleware": "^3.0.7",
137
136
  "less-loader": "^12.2.0",
@@ -152,14 +151,14 @@
152
151
  "tslib": "^2.3.0",
153
152
  "webpack": "5.105.2",
154
153
  "webpack-node-externals": "^3.0.0",
155
- "@nx/devkit": "23.2.0-beta.7",
156
- "@nx/module-federation": "23.2.0-beta.7",
157
- "@nx/web": "23.2.0-beta.7",
158
- "@nx/js": "23.2.0-beta.7"
154
+ "@nx/devkit": "23.2.0-beta.9",
155
+ "@nx/js": "23.2.0-beta.9",
156
+ "@nx/module-federation": "23.2.0-beta.9",
157
+ "@nx/web": "23.2.0-beta.9"
159
158
  },
160
159
  "devDependencies": {
161
- "nx": "23.2.0-beta.7",
162
- "@nx/nest": "23.2.0-beta.7"
160
+ "nx": "23.2.0-beta.9",
161
+ "@nx/nest": "23.2.0-beta.9"
163
162
  },
164
163
  "peerDependencies": {
165
164
  "@rspack/cli": "^1.0.0 || ^2.0.0",