For development, an app can be linked to a development workspace so that any local code change can be automatically synced and made available in that corresponding workspace.
Linking an app to a production workspace is not possible.
Step by step
- Open the terminal and log in to your VTEX account.
_10vtex login {account}
- Change to a development workspace.
_10vtex use {workspace}
- Change to your app's directory.
_10cd {directory}
- Link your app to the current workspace by running the following command:
_10vtex link
Once your local files are uploaded and synced to your development environment, you should see the following message: App linked successfully
. Use https://{workspace}--{account}.myvtex.com
, where workspace
is the development workspace in use and account
is the name of your VTEX account, to check your local version of the app.
Notice that the synced app will only be available within the specified development workspace.
If you are comfortable with your changes and want to make your changes publicly available, please refer to this guide.