How to create a new block using an extension

Step 1: Create a new extension

You’ll use Shopify CLI to generate a new extension.

  1. Navigate to the directory of the app that you want to add your extension to.
  2. Run the following command to start creating the extension:

$ Shopify extension create –getting-started

After executing the command, choose the extension type and the newly formed app.

Step 2: Register the extension

Run the following command: cd theme-app-extension

registration of extension can be done using the below command,

$ Shopify extension register

Step 3: push the extension

open the URL and disable the extension preview option.

Leave a comment

Your email address will not be published. Required fields are marked *