@nx/react 0.0.0-pr-28808-bceb02f → 0.0.0-pr-28808-f5b5ede

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "0.0.0-pr-28808-bceb02f",
3
+ "version": "0.0.0-pr-28808-f5b5ede",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -39,10 +39,10 @@
39
39
  "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
41
  "@module-federation/enhanced": "0.6.9",
42
- "@nx/devkit": "0.0.0-pr-28808-bceb02f",
43
- "@nx/js": "0.0.0-pr-28808-bceb02f",
44
- "@nx/eslint": "0.0.0-pr-28808-bceb02f",
45
- "@nx/web": "0.0.0-pr-28808-bceb02f",
42
+ "@nx/devkit": "0.0.0-pr-28808-f5b5ede",
43
+ "@nx/js": "0.0.0-pr-28808-f5b5ede",
44
+ "@nx/eslint": "0.0.0-pr-28808-f5b5ede",
45
+ "@nx/web": "0.0.0-pr-28808-f5b5ede",
46
46
  "express": "^4.19.2",
47
47
  "http-proxy-middleware": "^3.0.3"
48
48
  },
@@ -257,7 +257,6 @@ async function applicationGeneratorInternal(host, schema) {
257
257
  jsx: 'react-jsx',
258
258
  module: 'esnext',
259
259
  moduleResolution: 'bundler',
260
- // outDir: 'dist/app',
261
260
  });
262
261
  if (!options.skipFormat) {
263
262
  await (0, devkit_1.formatFiles)(host);
@@ -8,15 +8,10 @@ function updateModuleFederationTsconfig(host, options) {
8
8
  const tsconfigRuntimePath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json');
9
9
  if (!host.exists(tsconfigPath) || !host.exists(tsconfigRuntimePath))
10
10
  return;
11
- // Using `composite: true` and not setting `baseUrl` currently does not work with MF.
12
- // In integrated setup, `baseUrl` was set in `tsconfig.base.json` and we did not set `composite: true`.
11
+ // Not setting `baseUrl` does not work with MF.
13
12
  if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
14
- (0, devkit_1.updateJson)(host, tsconfigRuntimePath, (json) => {
15
- json.compilerOptions = {
16
- ...json.compilerOptions,
17
- composite: false,
18
- baseUrl: (0, devkit_1.offsetFromRoot)(options.appProjectRoot),
19
- };
13
+ (0, devkit_1.updateJson)(host, 'tsconfig.base.json', (json) => {
14
+ json.compilerOptions.baseUrl = '.';
20
15
  return json;
21
16
  });
22
17
  // Update references to match what `nx sync` does.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateModuleFederationProject = updateModuleFederationProject;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const maybe_js_1 = require("../utils/maybe-js");
6
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
7
  function updateModuleFederationProject(host, options) {
7
8
  const projectConfig = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
8
9
  if (options.bundler === 'rspack') {
@@ -76,5 +77,10 @@ function updateModuleFederationProject(host, options) {
76
77
  },
77
78
  },
78
79
  };
80
+ // Typechecks must be performed first before build and serve to generate remote d.ts files.
81
+ if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
82
+ projectConfig.targets.build.dependsOn = ['^build', 'typecheck'];
83
+ projectConfig.targets.serve.dependsOn = ['typecheck'];
84
+ }
79
85
  (0, devkit_1.updateProjectConfiguration)(host, options.projectName, projectConfig);
80
86
  }