maddsua / ssg-assets

Convert media assets for your static website + UI Picture component for Vue, Svelte, React, Astro and more

Home Page:https://www.npmjs.com/package/@maddsua/ssg-assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge with assetctx

maddsua opened this issue · comments

Add support for easy cache invalidation on cheap hostings

Possible solutions list:

  • Static json file import: ugly asf, will dangle in the repo, potentially can backfire if "resolve json module" is not active. Works ok otherwise
  • Dynamic json file import: can be bundled just as static import too, but if file not found will leave a broken import that will shit all over console
  • global window object: not the worst idea but will require injecting scripts and hoping that no race condition will occur
  • env variables: shit ton of different implementations depending on a chosen bundler, not worth it
  • global object provided by a bundler: see previous one any multiply by 3. seems good on paper but works even worse

string replacement, fucking seriously. average fucking javascript dev experience