fix(react): install rollup package when generating lib (#16373)

This commit is contained in:
Katerina Skroumpelou 2023-04-18 20:59:16 +03:00 committed by GitHub
parent 5a0a4e8d26
commit a4ef9596d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,7 @@ describe('rollupInitGenerator', () => {
name: expect.any(String),
dependencies: {},
devDependencies: {
'@nx/rollup': nxVersion,
tslib: expect.any(String),
},
});

View File

@ -33,7 +33,14 @@ export async function rollupInitGenerator(tree: Tree, schema: Schema) {
}
);
} else {
task = addDependenciesToPackageJson(tree, {}, { tslib: tsLibVersion });
task = addDependenciesToPackageJson(
tree,
{},
{
'@nx/rollup': nxVersion,
tslib: tsLibVersion,
}
);
}
if (!schema.skipFormat) {