amplify-adapter
v1.2.3
Published
Adapter for SvelteKit v1/v2 + Amplify SSR CI/CD
Readme
amplify-adapter
Adapter for SvelteKit apps to Amplify Host CI/CD.
Este paquete se creó para adaptar el paquete @sveltejs/node-adapter para su uso con CI/CD en AWS Amplify + SSR. Este paquete incluye los siguientes cambios:
Limitations:
- Artifacts size limit: 200 MB
Video tutorial
Official documentation on AWS Amplify
https://docs.aws.amazon.com/amplify/latest/userguide/get-started-sveltekit.html
Sveltekit amplify adapter installation
- Install with npm, pnpm or yarn:
npm install --save-dev amplify-adapter- Add the adapter to your
svelte.config.js:
// svelte.config.js
import adapter from 'amplify-adapter';Amplify Hosting Integration (CI/CD)
- Create a new app in Amplify Console, choose your git provider and click
Next.

- Select your repository and branch, and click
Next.

- Click
Edit YMLbutton:

Add preBuild command:
- 'corepack enable'Set Artifact base directory to
buildand add the following lines tofrontend -> buildphaseIf
keepPackageDependenciesset totrueadd following lines tofrontend -> buildphase, afterpnpm run buildcommand:
- 'cd build/compute/default/'
- 'pnpm i --production'version: 1
frontend:
phases:
preBuild:
commands:
- 'corepack enable'
- 'pnpm install --frozen-lockfile'
build:
commands:
- 'pnpm run build'
#- 'cd build/compute/default/'
#- 'pnpm i --production'
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- Click
NexttoReviewyour app configuration and clickSave and Deploy.
