-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nf): support adding native federation in ESM application
- Loading branch information
Zissis Tabouras
committed
Nov 6, 2024
1 parent
434a94e
commit dcc0fdc
Showing
6 changed files
with
81 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
{ | ||
"$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json", | ||
"name": "native-federation", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"schematics": { | ||
"update18": { | ||
"version": "18", | ||
"factory": "./src/schematics/update18/schematic", | ||
"schema": "./src/schematics/update18/schema.json", | ||
"description": "migrating to v18" | ||
}, | ||
"updateConfigExtension": { | ||
"version": "18.1", | ||
"factory": "./src/schematics/updateConfigExtension/schematic", | ||
"schema": "./src/schematics/updateConfigExtension/schema.json", | ||
"description": "renaming config file to .cjs" | ||
} | ||
} | ||
} |
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
File renamed without changes.
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
7 changes: 7 additions & 0 deletions
7
libs/native-federation/src/schematics/updateConfigExtension/schema.json
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,7 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema", | ||
"$id": "mf", | ||
"title": "", | ||
"type": "object", | ||
"properties": {} | ||
} |
11 changes: 11 additions & 0 deletions
11
libs/native-federation/src/schematics/updateConfigExtension/schematic.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,11 @@ | ||
import { Rule, Tree } from '@angular-devkit/schematics'; | ||
import { MfSchematicSchema } from '../init/schema'; | ||
import { renameConfigToCjs } from '../init/schematic'; | ||
|
||
export default function updateConfigExtension( | ||
options: MfSchematicSchema | ||
): Rule { | ||
return async function (tree: Tree) { | ||
renameConfigToCjs(options, tree); | ||
}; | ||
} |