Open Huge opened 1 month ago
The advantage of src/assets
is that Vite adds the hash to the file name to make caching easier
Gotcha. Maybe use vite-plugin-static-copy plugin for that?-)
Also stupid and irrelevant Q: how can vite
be run/used on this project? It's not mentioned in the Readme.
Some docs re how Netlify (as a CDN based web server) and Svelte (with its own configurable caching of assets and page content) work together would be helpful. It certainly wasn't transparent when Joep and I were looking at options for how to cache Airtable sourced content the other day.
On Wed, 2 Oct 2024, 23:33 Huge, @.***> wrote:
Gotcha. Maybe use vite-plugin-static-copy plugin for that?-)
Also stupid and irrelevant Q: how can vite be run/used on this project? It's not mentioned in the Readme.
— Reply to this email directly, view it on GitHub https://github.com/PauseAI/pauseai-website/issues/214#issuecomment-2389800253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAXXDODH35XEMBWRH5BYODZZRYEJAVCNFSM6AAAAABPDCNII2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBZHAYDAMRVGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@Huge
Gotcha. Maybe use vite-plugin-static-copy plugin for that?-)
Not sure how that would work, it seems like the plugin can only copy files, and Vite also modifies the imports.
Also stupid and irrelevant Q: how can
vite
be run/used on this project? It's not mentioned in the Readme.
SvelteKit is built on top of Vite (which isn't obvious, so more documentation probably wouldn't hurt).
@anthonybailey
Some docs re how Netlify (as a CDN based web server) and Svelte (with its own configurable caching of assets and page content) work together would be helpful.
My understanding is the following:
_headers
file for Netlify, which makes it serve everything in build/_app/immutable
with a Cache-Control
header that tells the CDN and the browser to cache really long because everything in there has the hash in the filename.If-None-Match
header.
Why are those pictures in
src
directory? Stops my hacky workflows with supplying all the code to AIs.-}➜ ~ du -sh pauseai-website/src/assets/quote-bg/* 7.4M pauseai-website/src/assets/quote-bg/altman.jpg 288K pauseai-website/src/assets/quote-bg/amodei.jpg 6.1M pauseai-website/src/assets/quote-bg/bengio.jpg 252K pauseai-website/src/assets/quote-bg/biden.jpg 20K pauseai-website/src/assets/quote-bg/black.jpg 196K pauseai-website/src/assets/quote-bg/brockman.jpg 80K pauseai-website/src/assets/quote-bg/butler.jpg 128K pauseai-website/src/assets/quote-bg/cais_statement.jpg 4.0K pauseai-website/src/assets/quote-bg/dark_grey.jpg 132K pauseai-website/src/assets/quote-bg/for-cais-statement 356K pauseai-website/src/assets/quote-bg/gates.jpg 204K pauseai-website/src/assets/quote-bg/guterres.jpg 136K pauseai-website/src/assets/quote-bg/harris.jpg 316K pauseai-website/src/assets/quote-bg/hassabis.jpg 56K pauseai-website/src/assets/quote-bg/hawking.jpg 96K pauseai-website/src/assets/quote-bg/hinton.jpg 168K pauseai-website/src/assets/quote-bg/jun.jpg 11M pauseai-website/src/assets/quote-bg/lecun.jpg 156K pauseai-website/src/assets/quote-bg/leyen.jpg 16K pauseai-website/src/assets/quote-bg/light_blue.jpg 4.0K pauseai-website/src/assets/quote-bg/light_grey.jpg 216K pauseai-website/src/assets/quote-bg/musk.jpg 20K pauseai-website/src/assets/quote-bg/old.jpg 144K pauseai-website/src/assets/quote-bg/pope.jpg 76K pauseai-website/src/assets/quote-bg/putin.jpg 384K pauseai-website/src/assets/quote-bg/qiang.jpg 240K pauseai-website/src/assets/quote-bg/russell.jpg 172K pauseai-website/src/assets/quote-bg/suleyman.jpg 504K pauseai-website/src/assets/quote-bg/summit_declaration.jpg 264K pauseai-website/src/assets/quote-bg/sunak.jpg 308K pauseai-website/src/assets/quote-bg/tallinn.jpg 188K pauseai-website/src/assets/quote-bg/trump.jpg 168K pauseai-website/src/assets/quote-bg/turing.jpg 1.6M pauseai-website/src/assets/quote-bg/white.jpg 364K pauseai-website/src/assets/quote-bg/yudkowsky.jpg