image icon indicating copy to clipboard operation
image copied to clipboard

Deploy with AWS Amplify, Nuxt's baseURL not effect.

Open BoBo-Git opened this issue 2 months ago • 0 comments

I made the following configuration in nuxt.config.ts

export default defineNuxtConfig({
   // other configs

   app: {
     baseURL: 'xxxxx' // my base url read from .env 
   },

    // other configs
})

After deploying the project through Amplify, I checked the image paths using NuxtImg, and they all start with /_amplify/image, without concatenating the baseURL configured for my project, causing the images to fail to access normally.

I reviewed the source code of the AWS Amplify provider and found that the default value is configured this way; it does not read the relevant configuration from the Nuxt configuration, which may be the cause of the issue.

Image

BoBo-Git avatar Nov 12 '25 04:11 BoBo-Git