Using Shopify App Bridge without NPM

Highlighted
New Member
13 0 0

I am a php developer and I have to use Shopify App Bridge however, it seems to be npm must be installed to use app bridge. I have never used npm and I will not use  it !
I dont have to install npm on my server. I dont hate work with npm but
Why Shopify forces developers to use it!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
53 11 19

Hi Aljazari, 

You can use an npm CDN to include App Bridge as a script tag:

<script src="https://unpkg.com/@shopify/app-bridge"></script>
<script>
  var AppBridge = window['app-bridge'];
  var actions = window['app-bridge'].actions;
</script>

See the docs for more info: https://shopify.dev/tools/app-bridge/getting-started#set-up-shopify-app-bridge-in-your-app

1 Like