Re: Deploying extensions with existing build with re build it on deploy

Deploying extensions with existing build with re build it on deploy

Gil_GLBE
Shopify Partner
2 0 0

Hey all,

I want to check if it's possible to create a build locally and deploy this build separately. Specifically, we want to first use the

shop app build

, which creates a dist folder (with minified files and .map files), and then deploy this build using the 

 

 

shop app deploy

 

 

(without building again during deployment).

 

How can we achieve this?

For more context, I implemented Sentry  for real-time monitoring, and I want to deploy valid source maps to be able to see the error stack traces unminified.

Replies 2 (2)

Liam
Community Manager
3108 340 871

Hi Gil,

 

This is currently not possible, deploy will trigger a re-build. Is your problem not about using the output of `build`, but having access to the sourcemaps generated during `deploy`? The output from `build` and `deploy` should be the same, can you use the sourcemaps produced by `build`?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Gil_GLBE
Shopify Partner
2 0 0

Hey  @Liam 

Thanks for the quick response.

I followed the Sentry guide with the help of the Sentry team. What's needed is to deploy the source map files with the injected debug_ids. This way, Sentry can connect the minified code to the map file. So, when I build locally and inject + upload the source maps to Sentry, the minified files in production don't contain the ids.

 

For more context, I followed this guide for implementing Sentry in checkout UI extensions and analytics web pixel.