Releasing a Block to Production

In this article, we’ll cover putting the final touches on your block and releasing it into the production environment.

  1. After confirming that your block is in staging, open your terminal and run `npm run build` to make sure that everything is compiled and all tests are passing. 
  2. Run `element release`—you will see a message that this non-major version change will take effect immediately on all stores that have your block installed. Confirm this to continue.
  3. Once you see the message that the block has been released into production, go back into Site Designer and refresh the page—now if you edit the block, it no longer says that it is in staging. 
  4. Publish your changes using the button in the top left-hand corner and view your live store—you’ll be able to see your block there. 

Note: the live storefront has a server cache, so it may take a few minutes for your changes to appear. If you want to, you can add ?cache-bust=0 to the end of your URL to bust that cache.