Hello,
I am developing a custom app using Remix template and tried to use Polaris web components (s-*) for embedded Admin pages but they are not rendering at all. I believe polaris.js that is supposed to be injected automatically by AppProvider is not getting loaded. There are no console errors that indicate what the root cause could be.
You’re correct that Remix performs server-side rendering first. If Polaris custom elements are only defined on the client side, the initial server render won’t recognize them, causing those components to render as empty or unknown HTML elements. This can lead to rendering issues or flashes of unstyled content.
To address this, you might consider implementing dynamic import or client-only rendering for those Polaris components, ensuring they initialize only after the client-side JavaScript loads. Alternatively, you can check if server-side compatible versions of the Polaris elements or polyfills are available to support rendering on both server and client.