Skip to content

Commit

Permalink
fix: install ngx-build-plus via schematic to avoid issues with yarn
Browse files Browse the repository at this point in the history
Before, ngx-build-plus was installed as a dependency. However, this
caused issues with yarn as yarn was not able of resolving it for
the CLI as a builder.

Now, the ng-add/init schematic installs ngx-build-plus
  • Loading branch information
manfredsteyer committed Feb 13, 2022
1 parent f4b5dc2 commit ee6ffe9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion libs/mf-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@angular-architects/module-federation-runtime",
"license": "MIT",
"version": "14.0.3",
"version": "14.1.1",
"peerDependencies": {
"@angular/common": ">=12.0.0",
"@angular/core": ">=12.0.0"
Expand Down
4 changes: 2 additions & 2 deletions libs/mf-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@angular-architects/module-federation-tools",
"version": "14.0.3",
"version": "14.1.1",
"license": "MIT",
"peerDependencies": {
"@angular/common": ">=11.0.0",
"@angular/core": ">=11.0.0",
"@angular/router": ">=11.0.0",
"@angular-architects/module-federation": "^14.0.3",
"@angular-architects/module-federation": "^14.1.1",
"@angular/platform-browser": ">=11.0.0",
"rxjs": ">= 6.0.0"
},
Expand Down
9 changes: 4 additions & 5 deletions libs/mf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular-architects/module-federation",
"version": "14.0.3",
"version": "14.1.1",
"license": "MIT",
"repository": {
"type": "GitHub",
Expand All @@ -17,12 +17,11 @@
"schematics": "./collection.json",
"builders": "./builders.json",
"dependencies": {
"@angular-architects/module-federation-runtime": "14.0.3",
"@angular-architects/module-federation-runtime": "14.1.1",
"word-wrap": "^1.2.3",
"callsite": "^1.0.0",
"node-fetch": "^2.6.1",
"semver": "^7.3.5",
"ngx-build-plus":"^13.0.0"
"node-fetch": "^2.6.7",
"semver": "^7.3.5"
},
"peerDependencies": {
},
Expand Down
17 changes: 7 additions & 10 deletions libs/mf/src/schematics/mf/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,7 @@ export default function config (options: MfSchematicSchema): Rule {
updateTsConfig(tree, tsConfigName);

const localTsConfig = path.join(projectRoot, 'tsconfig.app.json');
console.log('localTsConfig', localTsConfig);
if (tree.exists(localTsConfig)) {
console.log('exists');

updateTsConfig(tree, localTsConfig);
}

Expand All @@ -288,14 +285,14 @@ export default function config (options: MfSchematicSchema): Rule {

updatePackageJson(tree);

// addPackageJsonDependency(tree, {
// name: 'ngx-build-plus',
// type: NodeDependencyType.Dev,
// version: '^13.0.1',
// overwrite: true
// });
addPackageJsonDependency(tree, {
name: 'ngx-build-plus',
type: NodeDependencyType.Dev,
version: '^13.0.1',
overwrite: true
});

// context.addTask(new NodePackageInstallTask());
context.addTask(new NodePackageInstallTask());

return chain([
makeMainAsync(main),
Expand Down

0 comments on commit ee6ffe9

Please sign in to comment.