Search code examples
amazon-web-servicesaws-amplifysveltesveltekit

Deploy static Svelte-Kit app with AWS Amplify


I'm trying to deploy my Svelte app on AWS Amplify, I push the commits, Amplify builds and verifies the app, but then if I visit the app URL it's just a blank page, it might be an adapter problem? I tried the node.js and static ones but no luck


Solution

  • In the end, this solved the problem:

    svelte.config.js

    import adapter from '@sveltejs/adapter-static';
    
    /** @type {import('@sveltejs/kit').Config} */
    const config = {
        kit: {
            adapter: adapter(),
            prerender: {
                default: true
            }
        }
    };
    
    export default config;