Open trandaison opened 9 months ago
Hi @trandaison :wave: !
Thanks for reaching out to us. To immediately unblock yourself, please remove the second rewrite rule from your app - It should prevent the 404 error from occurring.
Aside from that, could you please confirm if you have vue
as a separate dependency in your package.json
? If so, could you please explain your use case for that?
@Narrator Thanks for replying!
Thanks for reaching out to us. To immediately unblock yourself, please remove the second rewrite rule from your app - It should prevent the 404 error from occurring.
Actually, I had to remove all 2 rules, because the first one will cause redirect to /index.html
when I visit the home page.
Aside from that, could you please confirm if you have vue as a separate dependency in your package.json? If so, could you please explain your use case for that?
Yes I do have vue
in dependencies
, I also have nuxt
in devDependencies
as well.
By default, nuxt create a package.json with both nuxt
and vue
as separate dependencies.
Before opening, please confirm:
App Id
d1cs14y4x3ieze
AWS Region
ap-southeast-1
Amplify Hosting feature
Redirects, SSR
Frontend framework
Vue
Next.js version
Nuxt Version: 3.8.2
Next.js router
N/A
Describe the bug
Amplify has these Rewrites and redirects settings by default.
However, it's not working for a Nuxt SSR app, because nuxt build does not create any
index.html
file, it will keep redirecting to/index.html
for every routes.Expected behavior
These settings should not be set by default for Nuxt SRR applications.
Reproduction steps
/login
main.<app-id>.amplifyapp.com/login
It redirect to
/index.html
, since this file does not exist it will show 404 error.Build Settings
No response
Log output
Additional information
No response