fix(storybook): only check existence of storybook before migrating (#16431)
This commit is contained in:
parent
a51ac58a45
commit
e447f2c4fa
@ -5,7 +5,15 @@ import { storybookMajorVersion } from '../../utils/utilities';
|
|||||||
|
|
||||||
export default async function changeStorybookTargets(tree: Tree) {
|
export default async function changeStorybookTargets(tree: Tree) {
|
||||||
const storybookVersion = storybookMajorVersion();
|
const storybookVersion = storybookMajorVersion();
|
||||||
if (!storybookVersion || storybookVersion === 7) {
|
if (!storybookVersion) {
|
||||||
|
/**
|
||||||
|
* This just checks if Storybook is installed in the workspace.
|
||||||
|
* The thing here is that during the previous step of the migration,
|
||||||
|
* during packageJsonUpdates, Nx has already set Storybook
|
||||||
|
* to version 7, if Storybook exists in the workspace.
|
||||||
|
* So, it makes no sense here to check if the version is
|
||||||
|
* 7, because it will always be.
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user