How to rename components scope? #4630
-
Hi, We have a bitdev account with the organisation name the same as component scope. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
there is no rename scope, as the scope is part of the component id which means it's part of the module name. |
Beta Was this translation helpful? Give feedback.
there is no rename scope, as the scope is part of the component id which means it's part of the module name.
So changing the scope name require you to change the import statement in all of the code.
Also, the import statements between the components are in the same scope.
Usually, the best practice is to deprecate the component with the old name and export it as a new component to another scope.
In your case where you want to rename the entire scope, I would import all the components into the same workspace (or if you already have a workspace contain them all), then use the
bit init --reset-new
to make all of them being new components.Then change the default scope, all the import stateme…