@nx/rsbuild 20.3.1 → 20.4.0-beta.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/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/rsbuild",
3
3
  "description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
4
- "version": "20.3.1",
4
+ "version": "20.4.0-beta.0",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -30,8 +30,8 @@
30
30
  "executors": "./executors.json",
31
31
  "dependencies": {
32
32
  "tslib": "^2.3.0",
33
- "@nx/devkit": "20.3.1",
34
- "@nx/js": "20.3.1",
33
+ "@nx/devkit": "20.4.0-beta.0",
34
+ "@nx/js": "20.4.0-beta.0",
35
35
  "@rsbuild/core": "1.1.8",
36
36
  "minimatch": "9.0.3",
37
37
  "@phenomnomnominal/tsquery": "~5.0.1"
@@ -32,6 +32,16 @@ async function initGeneratorInternal(tree, schema) {
32
32
  'rsbuild:typecheck',
33
33
  'rsbuild-typecheck',
34
34
  ],
35
+ buildDepsTargetName: [
36
+ 'build-deps',
37
+ 'rsbuild:build-deps',
38
+ 'rsbuild-build-deps',
39
+ ],
40
+ watchDepsTargetName: [
41
+ 'watch-deps',
42
+ 'rsbuild:watch-deps',
43
+ 'rsbuild-watch-deps',
44
+ ],
35
45
  }, schema.updatePackageScripts);
36
46
  }
37
47
  const tasks = [];
@@ -5,5 +5,7 @@ export interface RsbuildPluginOptions {
5
5
  previewTargetName?: string;
6
6
  inspectTargetName?: string;
7
7
  typecheckTargetName?: string;
8
+ buildDepsTargetName?: string;
9
+ watchDepsTargetName?: string;
8
10
  }
9
11
  export declare const createNodesV2: CreateNodesV2<RsbuildPluginOptions>;
@@ -12,6 +12,7 @@ const fs_1 = require("fs");
12
12
  const path_1 = require("path");
13
13
  const minimatch_1 = require("minimatch");
14
14
  const core_1 = require("@rsbuild/core");
15
+ const util_1 = require("@nx/js/src/plugins/typescript/util");
15
16
  const pmc = (0, devkit_1.getPackageManagerCommand)();
16
17
  function readTargetsCache(cachePath) {
17
18
  return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
@@ -144,6 +145,7 @@ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConf
144
145
  },
145
146
  };
146
147
  }
148
+ (0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
147
149
  return { targets, metadata: {} };
148
150
  }
149
151
  function getOutputs(rsbuildConfig, projectRoot, workspaceRoot) {