ipfs / service-worker-gateway

[WIP EXPERIMENT] IPFS Gateway implemented in Service Worker
https://inbrowser.link
Other
17 stars 8 forks source link

fix: revert "feat: migrate to preact/compat (#190)" #219

Closed SgtPooki closed 2 months ago

SgtPooki commented 2 months ago

Title

fix: revert "feat: migrate to preact/compat (#190)"

Description

This reverts commit 8c98f579b95992072474f02fe39865fda825379d from PR #190

Notes & open questions

I believe this was causing some issues in deployed environments.. I was also able to reproduce some errors locally with http-server and npm start.. Issues include:

  1. not being able to find css/js assets consistently
  2. CMD+SHIFT+R resulting in renderable content, CMD+R resulting in missing assets and failed loading
  3. css file not found for config page when attempting to load subdomain config page directly (found when trying to look into https://github.com/ipfs-shipyard/service-worker-gateway/issues/218)

Apparently preact support is not quite where we need it with webpack 5, or we need to do some additional config. Considering the large reduction in final asset size, it was worth a try, but reverting now because potential pains & incompatibility are not worth it.

We can potentially investigate this further later, but we would need some way to reproduce these errors consistently and write some test to catch those failures.

Change checklist