Skip to content

How to rename components scope? #4630

Answered by GiladShoham
ivansky asked this question in Help
Discussion options

You must be logged in to vote

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ivansky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants