Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplify Gen2 - Next.js AssetPrefix feature not working with Nextjs version 14 #3965

Open
3 tasks done
sagshar5 opened this issue Nov 7, 2024 · 2 comments
Open
3 tasks done
Labels
feature-request New feature or request

Comments

@sagshar5
Copy link

sagshar5 commented Nov 7, 2024

Before opening, please confirm:

Amplify Hosting feature

Deployments

Is your feature request related to a problem? Please describe:

Created new Nextjs App :
-> npx create-next-app@latest

Keeping static files under /assets in my project directory

updated next.config.js file as below :

  export default () => {
  
  const nextConfig = {
    assetPrefix: '/assets'
  }
  return nextConfig
}

host the application over Amplify Gen 2, it start throwing 404 errors for all the .css and .js files as show in screenshot below :

In browser, I am able to seeing 404 errors for files like below

http://localhost:3000/assets/_next/static/chunks/webpack-8e097dbXXXXXX63.js

Describe how you'd like this feature to work

If you inspect and go to Network, you should be able to see static files served from /assets without 404 errors

@sagshar5 sagshar5 added the feature-request New feature or request label Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

@sagshar5 sagshar5 changed the title Amplify Gen2 - Next.js AssetPrefix feature not working with Nextjs version >= 13.4.13 Amplify Gen2 - Next.js AssetPrefix feature not working with Nextjs version 14 Nov 7, 2024
@iamaralinvestplay
Copy link

Are there any updates on this? I need to move my app from vercel to amplify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants