Closed janniks closed 2 years ago
cc @kyranjamie does this make sense or are there other options to consider w/ stencil?
So the gist here is just creating an alternate method that synchronously loads the connect dialog?
Code looks good but, I'm not so familiar with stencil so have nothing specific to suggest.
So the gist here is just creating an alternate method that synchronously loads the connect dialog?
Yep, although upon re-checking the latest release literally just added a fix for this, days ago. It's marked as experimental, but I'll test in a new PR.
UPDATE: the other fix doesn't seem to work in the case. so i'm going to stick with the static
option proposed here. if the issue in stencil is resolved we can retry moving to the experimental imports.
dist-custom-elements
distribution ofconnect-ui
, since rollup-based projects don't handle dynamic loaded stencil wellshowConnectStatic
method (just a copy ofshowConnect
without dynamic loading)using
*Static
would always bundle the connect-ui (ideally only shown when somebody has an incompatible browser, or is missing the wallet extension) into a project. however, developers could adjust their configs (e.g. rollup >manualChunks
) to achieve similar dynamic loading/chunking, but handled by the last bundler in the build step (rather than stencil before distribution, which is optimized for webpack)