Reputation: 43
Hi I've been trying to deploy my Svelte kit 1.0 to AWS Amplify. I push the commits and then Amplify builds and verify the app pass , but then if I visit the app URL it's just a blank page. Please see build below.
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: /.svelte-kit/build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
Upvotes: 1
Views: 3606
Reputation: 19004
There's now a SvelteKit Amplify adapter: https://github.com/gzimbron/amplify-adapter
The full list of SvelteKit adapters is available on https://www.sveltesociety.dev/packages?category=sveltekit-adapters - a few platforms have multiple adapters available
Upvotes: 1
Reputation: 774
If you want to publish a SvelteKit app to AWS Amplify, you have to make sure to use the correct adapter which is @sveltejs/adapter-static
. You also need to set the pretender default to true.
Reference Deploy static Svelte-Kit app with AWS Amplify
Upvotes: 1