natemoo-re / microsite

Do more with less JavaScript. Microsite is a smarter, performance-obsessed static site generator powered by Preact and Snowpack.

Home Page:https://npm.im/microsite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vendor js may be bundled/loaded with no hydration on page

eyelidlessness opened this issue · comments

I’m not entirely convinced this is a bug or that it even needs to be addressed, but I wanted to report what I’ve seen and hopefully circle back with a minimal repro as I’m able.

Some (as yet unclear) combination of dependencies and imports has led some pages on my site to bundle and load vendor/Preact/microsite-runtime etc even without any hydration. I had to bail on investigation for now because I’m trying not to rabbit hole and I worked around it with Snowpack config voodoo. But I did want to make sure it’s noted here so I can come back and take a look later.

If I get a few spare brain cycles I’ll try a binary search on the set of Snowpack config changes that worked around it to hopefully isolate the cause. I strongly suspect given the state of my project that #105 is the root cause. My reasoning here is that I currently have several pages that all have the same set of imports (and display this behavior), and one page that doesn’t (and behaves as expected).

And just so I don’t lose my own partial investigation brain context the place I was looking into addressing this was here, looking more at info.importers. But it might be simpler to just look at the final result of hydration to determine whether the vendor import is needed.

Just adding a note that I also observed this behavior on the example sites when I was validating #117 so it’s definitely a concern. I still haven’t been able to get to deeper analysis of the issue but still pretty confident in my hunch about root cause and likely resolution above.

edit: and now I see this referenced in a commit so maybe you already resolved it!

ezoic increase your site revenue