Skip to content

Choose a tag to compare

@shopify-github-actions-access shopify-github-actions-access released this 18 Nov 19:44
· 7 commits to main since this release
f1a1efd

Patch Changes

  • 98f1be9: Add Web API and CF Worker adapter intialized constants for aggressive tree-shakers

    For example with the web-api adapter:

    // Instead of just:
    import '@shopify/shopify-api/adapters/web-api';
    
    // You can now also import:
    import {webApiAdapterInitialized} from '@shopify/shopify-api/adapters/web-api';
    import {shopifyApi} from '@shopify/shopify-api';
    
    // And check the adapter is initialized, which forces bundlers to keep the import
    if (!webApiAdapterInitialized) {
      throw new Error('Failed to initialize web API adapter');
    }