-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): add remote to tspaths for typing (#19276)
- Loading branch information
Showing
13 changed files
with
68 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/angular/src/generators/setup-mf/lib/setup-tspath-for-remote.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { Tree } from '@nx/devkit'; | ||
import type { Schema } from '../schema'; | ||
import { joinPathFragments, readProjectConfiguration } from '@nx/devkit'; | ||
import { addTsConfigPath } from '@nx/js'; | ||
|
||
export function setupTspathForRemote(tree: Tree, options: Schema) { | ||
const project = readProjectConfiguration(tree, options.appName); | ||
|
||
const exportPath = options.standalone | ||
? `./src/app/remote-entry/entry.routes.ts` | ||
: `./src/app/remote-entry/entry.module.ts`; | ||
|
||
const exportName = options.standalone ? 'Routes' : 'Module'; | ||
|
||
addTsConfigPath(tree, `${options.appName}/${exportName}`, [ | ||
joinPathFragments(project.root, exportPath), | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/react/src/generators/host/files/module-federation-ts/src/remotes.d.ts__tmpl__
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/react/src/generators/host/files/module-federation/src/remotes.d.ts__tmpl__
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/react/src/generators/remote/lib/setup-tspath-for-remote.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Tree } from '@nx/devkit'; | ||
import type { Schema } from '../schema'; | ||
import { joinPathFragments, readProjectConfiguration } from '@nx/devkit'; | ||
import { addTsConfigPath } from '@nx/js'; | ||
|
||
export function setupTspathForRemote(tree: Tree, options: Schema) { | ||
const project = readProjectConfiguration(tree, options.name); | ||
|
||
const exportPath = `./src/remote-entry.ts`; | ||
|
||
const exportName = 'Module'; | ||
|
||
addTsConfigPath(tree, `${options.name}/${exportName}`, [ | ||
joinPathFragments(project.root, exportPath), | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters