image
image copied to clipboard
Deploy with AWS Amplify, Nuxt's baseURL not effect.
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.