Very large static app #8868
-
I have been building a new version of my photo gallery using SvelteKit and I'm ready to publish it, however I'm running in to some issues with the speed that it's building. The gallery has close to a million pages total. I'm using msgpack files (like slim json basically) to store the data, but I don't want to include that data in the generated site. If I reference the msgpack files as external URLs to load, the build is quite slow, a few thousand pages per minute. If I reference the files locally in My end goal is to push all the html/js/etc files up to s3 (the images have already been uploaded). So I guess I have a few questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
1 & 2. You should be able to place these files in const msgpackFiles = import.meta.glob('$lib/data/*.msp'); https://vitejs.dev/guide/features.html#glob-import
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
pages: '../../somewhere/outside',
})
}
}; |
Beta Was this translation helpful? Give feedback.
1 & 2. You should be able to place these files in
src/lib
and import the filepaths such ashttps://vitejs.dev/guide/features.html#glob-import
https://kit.svelte.dev/docs/adapter-static#options-pages