Clunky TypeScript experience accessing `shopify` global and other 2025-10 update pains

We’re in the process of updating our collection of UI extensions to be compatible with the current major version of the Shopify UI extensions packages. We have more than 10 extensions across varying surfaces, many of which are highly complex, so the absence of any automated assistance (e.g. a codemod) makes this a very large, time- and energy-consuming task, because we need to do many things including:

  1. Migrating from React to Preact;
  2. Moving from the previous surface-specific components to Polaris web components;
  3. Changing our interactions with the platform from imported hooks to going via the shopify global.

We also have many automated tests which also need to be updated, making the task even more time-consuming. However, aside from the general pain of yet another big manual migration being forced upon us, so far we’ve encountered a couple of notable sources of pain/frustration relating to the points above:

  1. The change to a unified component set (Polaris web components) is amazing and definitely brings many benefits; however, we’re already finding that the Polaris web components don’t support many of the same options/values as the old extension-specific components. Consequently, as well as updating everything else to make the migration work, we’re having to iterate on the visuals and UX of our extensions because things that were previously possible aren’t any more;
  2. The new shopify global is quite a nice idea, but working with TypeScript when generating new extensions is very clunky, because the TS engine relies on the value being explicitly declared in the generated shopify.d.ts file for every single file in the extension – and this file only seems to get generated when we start running the dev server. Consequently, adding a new file to the extension (or moving/renaming a file) then trying to access the global shopify object in that file results in a TypeScript error until we exit and restart the dev server. The way we’re performing the migration means that we have many hundreds of files that need to go through this process, and having to stop and start the dev server for every one of them (or even batches of them) seems like unnecessary frustration.

Whilst I understand that these kinds of migrations should bring long-term benefits, it’d be great if in the future the Shopify devs could be more mindful of the real-world experience that those of us who build and maintain UI extensions face each time something like this happens (for reference, we’ve been working on UI extensions for 2-3 years and this is already the 2nd or 3rd time we’ve had to make large-scale manual changes to keep up with @shopify/ui-extensions updates :flushed_face:).

1 Like

Hi @AndyPye

Can you update CLI to use @shopify/cli@0.0.0-nightly-20251127224155 ? This issue should be fixed in this nightly version, and we’ll be releasing that to a stable version following BFCM.