-
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.
fix(react): ensure module federation template files are indented corr…
…ectly (#28753) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
- Loading branch information
Showing
6 changed files
with
33 additions
and
33 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
18 changes: 9 additions & 9 deletions
18
packages/react/src/generators/host/files/common-ts/src/main.ts__tmpl__
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<%_ if (dynamic) { _%> | ||
import { init } from '@module-federation/enhanced/runtime'; | ||
import { init } from '@module-federation/enhanced/runtime'; | ||
|
||
fetch('/assets/module-federation.manifest.json') | ||
.then((res) => res.json()) | ||
.then((remotes: Record<string, string>) => | ||
Object.entries(remotes).map(([name, entry]) => ({ name, entry })) | ||
) | ||
.then((remotes) => init({ name: '<%= projectName %>', remotes })) | ||
.then(() => import('./bootstrap').catch(err => console.error(err))); | ||
fetch('/assets/module-federation.manifest.json') | ||
.then((res) => res.json()) | ||
.then((remotes: Record<string, string>) => | ||
Object.entries(remotes).map(([name, entry]) => ({ name, entry })) | ||
) | ||
.then((remotes) => init({ name: '<%= projectName %>', remotes })) | ||
.then(() => import('./bootstrap').catch(err => console.error(err))); | ||
<%_ } else { _%> | ||
import('./bootstrap').catch(err => console.error(err)); | ||
import('./bootstrap').catch(err => console.error(err)); | ||
<%_ } _%> |
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: 9 additions & 9 deletions
18
packages/react/src/generators/host/files/common/src/main.js__tmpl__
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<%_ if (dynamic) { _%> | ||
import { init } from '@module-federation/enhanced/runtime'; | ||
import { init } from '@module-federation/enhanced/runtime'; | ||
|
||
fetch('/assets/module-federation.manifest.json') | ||
.then((res) => res.json()) | ||
.then((remotes: Record<string, string>) => | ||
Object.entries(remotes).map(([name, entry]) => ({ name, entry })) | ||
) | ||
.then((remotes) => init({ name: '<%= projectName %>', remotes })) | ||
.then(() => import('./bootstrap').catch(err => console.error(err))); | ||
fetch('/assets/module-federation.manifest.json') | ||
.then((res) => res.json()) | ||
.then((remotes: Record<string, string>) => | ||
Object.entries(remotes).map(([name, entry]) => ({ name, entry })) | ||
) | ||
.then((remotes) => init({ name: '<%= projectName %>', remotes })) | ||
.then(() => import('./bootstrap').catch(err => console.error(err))); | ||
<%_ } else { _%> | ||
import('./bootstrap').catch(err => console.error(err)); | ||
import('./bootstrap').catch(err => console.error(err)); | ||
<%_ } _%> |
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: 9 additions & 9 deletions
18
packages/react/src/generators/host/files/rspack-common/src/main.jsx__tmpl__
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<%_ if (dynamic) { _%> | ||
import { init } from '@module-federation/enhanced/runtime'; | ||
import { init } from '@module-federation/enhanced/runtime'; | ||
|
||
fetch('/assets/module-federation.manifest.json') | ||
.then((res) => res.json()) | ||
.then((remotes: Record<string, string>) => | ||
Object.entries(remotes).map(([name, entry]) => ({ name, entry })) | ||
) | ||
.then((remotes) => init({ name: '<%= projectName %>', remotes })) | ||
.then(() => import('./bootstrap').catch(err => console.error(err))); | ||
fetch('/assets/module-federation.manifest.json') | ||
.then((res) => res.json()) | ||
.then((remotes: Record<string, string>) => | ||
Object.entries(remotes).map(([name, entry]) => ({ name, entry })) | ||
) | ||
.then((remotes) => init({ name: '<%= projectName %>', remotes })) | ||
.then(() => import('./bootstrap').catch(err => console.error(err))); | ||
<%_ } else { _%> | ||
import('./bootstrap').catch(err => console.error(err)); | ||
import('./bootstrap').catch(err => console.error(err)); | ||
<%_ } _%> |