akivajgordon / tikkun.io

The online tikkun you always wanted, but never had.
https://www.tikkun.io
MIT License
46 stars 19 forks source link

Switch to Vite for local dev and deployment #123

Closed SLaks closed 1 month ago

SLaks commented 1 month ago

See #121

Note: The individual commits in this PR do not work without the entire chain; I divided it into multiple commits just to make the changes easier to review

SLaks commented 1 month ago

This also removes 2 unused PNG files

SLaks commented 1 month ago

AFAICT, the GitHub action should work for future PRs after this one is merged.

pull_request_target runs on pull requests, but uses the action config from the target branch in your repo (otherwise, it will fail because my action config cannot have access to your repo)

SLaks commented 1 month ago

BTW, replacing fetch() with import() also has other benefits:

I will probably send a followup PR to take advantage of these benefits.

If you don't want the code size cost, I should be able to use import.meta.url to make Vite correctly resolve (and I think deploy) the JSON for fetch(). However, that might make offline a bit more annoying to build.