In my Nuxt.js application, I have to use dynamic nested routes. This means I will end up by having various HTML files generated. The problem is that I must embed my whole application within an existing website, on a specific page, to be precise. In the beginning I thought only one page will be needed, but finally I ended up by having multiple pages.
- How can I embed my files given these constraints? Any approach?
- Is it possible to combine the SPA concept with dynamic nested routes?
These concepts are not mutually exclusive, you only need to set the nuxt.conf.js mode into 'spa' and you can leave everything else in place.
As per the official documentation:
without any further configuration you should be set to deploy your app.
Also note this:
This means that you need to generate your page in an environment where the ssr tools are installed.
Also the next parragraph
I confirm that we combine SPA and dynamic nested routes.
All what to do is to declare the dynamic routes within
nuxt.config.js
file and set:mode: 'spa'