Open
Description
Before opening, please confirm:
- I have checked to see if my question is addressed in the FAQ.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting questions.
- I have removed any sensitive information from my code snippets and submission.
App Id
d104w4v8nmd5no
AWS Region
us-east-2
Amplify Hosting feature
SSR
Question
I would like to be able to access my site through the production link provided through Amplify Hosting. I am using Vite with Vite SSR Plugin for frontend tooling.
version: 1
backend:
phases:
build:
commands:
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
- # Rename .js file to be properly called
- mv src/aws-exports.js src/aws-exports.ts
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build #(calls vite build)
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: dist/client
files:
- '**/*'
cache:
paths:
- node_modules/**/*
I also changed my Amplify config to Amplify.configure({ ...awsExports, ssr: true });
I read that Amplify automatically detects when using SSR, how could I configure my application to match this spec?
Currently, when I run a build. It succeeds but my site fails to show content