hearchco / sveltekit-adapter-aws

SvelteKit AWS universal adapter for generating necessary assets and code which can later be deployed using a custom IaC pipeline.
https://jsr.io/@hearchco/sveltekit-adapter-aws
Apache License 2.0
0 stars 0 forks source link

[FEAT] Code splitting #8

Open aleksasiriski opened 7 months ago

aleksasiriski commented 7 months ago

Every route should only have the code needed for it to run. This should be an option since it complicates deployment.

aleksasiriski commented 5 months ago

This should be optional, since it can impact performance, e.g. when a site has small number of requests and it makes sense to keep the function warm, or when the requests are expected to result in more requests (again, having the function warm is useful). Also, code splitting would only be good when the routes are large and the splitting actually makes the cold start faster, otherwise if it doesn't make the cold start any faster it's just fasting useful warm lambdas.