Implementing Preloader for Post-Purchase Extensions

Hello everyone,

We are currently developing a post-purchase extension app for our Shopify store and we are seeking guidance on how to implement a preloader for the post-purchase page, where the extension renders. Currently, it takes 1-2 seconds to load due to the bundle (main.js) loading time, particularly since we are using ngrok.

Unfortunately, we could not find any documentation or hooks that we could use to obtain the extension’s lifecycle status, which makes it difficult to implement the preloader. Therefore, we would appreciate any recommended code snippets or examples that we can use as a reference to resolve this issue and provide a smoother, more seamless UX.

Thank you in advance for any help!