I am using nuxtjs
When running in dev mode all urls work corretly, after npm run build
and deployment to a weblogic server I can only access the webroot directly.
From there the navigation to the dynamic routes work by clicking around.
However, when I type in a URL (other than the webroot) that should translate to a dynamic route, I get a 404 (but this works in dev mode).
Its because Dynamic routes are ignored by the generate command. You need to configure dynamic route generation by hand. See docs
You need to add fallback: true
to nuxt config generate parameter (docs). This redirects missing pages to 404.html
which then loads the index.html
// nuxt.config.js
export default {
generate: {
fallback: true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With