Skip to content

Commit 2fe3dc8

Browse files
committed
2 parents afa8343 + 3d18e6d commit 2fe3dc8

File tree

8 files changed

+36
-30
lines changed

8 files changed

+36
-30
lines changed

libs/mf-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@angular-architects/module-federation-runtime",
33
"license": "MIT",
4-
"version": "18.0.3",
4+
"version": "18.0.4",
55
"peerDependencies": {
66
"@angular/common": ">=18.0.0",
77
"@angular/core": ">=18.0.0"

libs/mf-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/module-federation-tools",
3-
"version": "18.0.3",
3+
"version": "18.0.4",
44
"license": "MIT",
55
"peerDependencies": {},
66
"dependencies": {

libs/mf/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-architects/module-federation",
3-
"version": "18.0.3",
3+
"version": "18.0.4",
44
"license": "MIT",
55
"repository": {
66
"type": "GitHub",
@@ -17,7 +17,7 @@
1717
"schematics": "./collection.json",
1818
"builders": "./builders.json",
1919
"dependencies": {
20-
"@angular-architects/module-federation-runtime": "18.0.3",
20+
"@angular-architects/module-federation-runtime": "18.0.4",
2121
"word-wrap": "^1.2.3",
2222
"callsite": "^1.0.0",
2323
"node-fetch": "^2.6.7",

libs/mf/post-build.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const fs = require('fs');
22
const path = require('path');
33

4-
54
// const index = fs.readFileSync(path.join(__dirname, 'src/index.ts'), {
65
// encoding: 'utf-8',
76
// });
@@ -21,14 +20,10 @@ const path = require('path');
2120
// nguniversal
2221
// );
2322

24-
25-
const webpack2 = fs.readFileSync(
26-
path.join(__dirname, 'webpack.ts'),
27-
{
28-
encoding: 'utf-8',
29-
}
30-
);
23+
const webpack2 = fs.readFileSync(path.join(__dirname, 'webpack.ts'), {
24+
encoding: 'utf-8',
25+
});
3126
fs.writeFileSync(
3227
path.join(__dirname, '../../dist/libs/mf/webpack.js'),
3328
'module.exports = require("./src/webpack.js");'
34-
);
29+
);

libs/mf/src/schematics/mf/schematic.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,18 @@ export default function config(options: MfSchematicSchema): Rule {
235235
buildConfig?.builder === '@angular-devkit/build-angular:application';
236236

237237
if (isApplicationBuilder) {
238-
console.warn(`\nWARNING: This package uses the tradtional webpack-based Module Federation implementation and not the fast new esbuild-based ApplicationBuilder.`)
239-
console.warn(`\nFor new projects, consider Native Federation as an alternative: https://shorturl.at/0ZQ0j`)
240-
console.warn(`\nHowever, if you want to add a new host or remote to an existing Module Federation-based system, this package is what you are looking for.`)
241-
console.warn(`\nDo you want to proceeed: [y] Yes [n] No \n`)
238+
console.warn(
239+
`\nWARNING: This package uses the tradtional webpack-based Module Federation implementation and not the fast new esbuild-based ApplicationBuilder.`
240+
);
241+
console.warn(
242+
`\nFor new projects, consider Native Federation as an alternative: https://shorturl.at/0ZQ0j`
243+
);
244+
console.warn(
245+
`\nHowever, if you want to add a new host or remote to an existing Module Federation-based system, this package is what you are looking for.`
246+
);
247+
console.warn(`\nDo you want to proceeed: [y] Yes [n] No \n`);
242248

243-
for (; ;) {
249+
for (;;) {
244250
const key = await readKey();
245251
if (key === 'Y' || key === 'y') {
246252
break;
@@ -249,7 +255,6 @@ export default function config(options: MfSchematicSchema): Rule {
249255
process.exit(0);
250256
}
251257
}
252-
253258
}
254259

255260
if (buildConfig?.options?.browser) {
@@ -436,7 +441,6 @@ async function readKey() {
436441
process.stdin.pause();
437442
r(key);
438443
});
439-
440444
});
441445
}
442446

@@ -546,7 +550,6 @@ export function generateSsrMappings(
546550
}
547551

548552
function downgradeToWebpack(build: any) {
549-
550553
if (!build.options) {
551554
return;
552555
}
@@ -565,4 +568,4 @@ function downgradeToWebpack(build: any) {
565568
asset.output = '.';
566569
}
567570
}
568-
}
571+
}

libs/mf/src/schematics/remove/schematic.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,32 @@ export default function remove(options: RemoveSchema): Rule {
2121
};
2222
}
2323

24-
function updateBuildConfig(normalized: { projectConfig: any; projectName: string; }) {
24+
function updateBuildConfig(normalized: {
25+
projectConfig: any;
26+
projectName: string;
27+
}) {
2528
const build = normalized.projectConfig.architect.build;
2629
build.builder = '@angular-devkit/build-angular:browser';
2730
delete build.options.extraWebpackConfig;
31+
delete build.options.customWebpackConfig;
32+
2833
const buildProd = build.configurations.production;
2934
delete buildProd.extraWebpackConfig;
35+
delete buildProd.customWebpackConfig;
3036
}
3137

32-
function updateServeConfig(normalized: { projectConfig: any; projectName: string; }) {
38+
function updateServeConfig(normalized: {
39+
projectConfig: any;
40+
projectName: string;
41+
}) {
3342
const serve = normalized.projectConfig.architect.serve;
3443
serve.builder = '@angular-devkit/build-angular:dev-server';
3544
delete serve.options.extraWebpackConfig;
45+
delete serve.options.customWebpackConfig;
3646

3747
const serveProd = serve.configurations.production;
3848
delete serveProd.extraWebpackConfig;
49+
delete serveProd.customWebpackConfig;
3950

4051
const prodTarget = serveProd.browserTarget;
4152
if (prodTarget) {
@@ -50,11 +61,9 @@ function updateServeConfig(normalized: { projectConfig: any; projectName: string
5061
delete serveDev.browserTarget;
5162
serveDev.buildTarget = devTarget;
5263
}
53-
5464
}
5565

5666
function normalize(options: RemoveSchema, workspace: any) {
57-
5867
if (!options.project) {
5968
options.project = workspace.defaultProject;
6069
}
@@ -95,4 +104,3 @@ function removeBootstrap(normalized, tree) {
95104
tree.overwrite(mainPath, content);
96105
tree.delete(bootstrapPath);
97106
}
98-

libs/mf/tutorial/tutorial.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,8 @@ So far, we just hardcoded the URLs pointing to our Micro Frontends. However, in
237237

238238
2. Adjust the shell's `main.ts` (`projects/shell/src/main.ts`) as follows:
239239

240-
```typescript
241-
import { loadManifest } from '@angular-architects/module-federation';
242-
```
240+
```typescript
241+
import { loadManifest } from '@angular-architects/module-federation';
243242

244243
loadManifest('assets/mf.manifest.json')
245244
.catch((err) => console.error('Error loading remote entries', err))

libs/native-federation-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@softarc/native-federation",
33
"version": "2.0.9",
44
"type": "commonjs",
5+
"license": "MIT",
56
"dependencies": {
67
"json5": "^2.2.0",
78
"npmlog": "^6.0.2",

0 commit comments

Comments
 (0)