Skip to content

Support for VikeJS #3490

Open
Open
@charlieforward9

Description

@charlieforward9

Before opening, please confirm:

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.

Build Settings
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/**/*

Build Folder Architecture
Screen Shot 2023-05-23 at 9 30 40 AM

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

(@brillout)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions