4 ms·
As you probably know, Nuxt.js uses a folder to url mapping, so say /src/views/contact/index.vue maps to /contact In my case I wanted to be able to change the ur
by adevx 8y ago
As you probably know, Nuxt.js uses a folder to url mapping, so say /src/views/contact/index.vue maps to /contact
In my case I wanted to be able to change the url depending on the language of the user. And not by prefixing it with a /en/contact vs /de/kontact. To make matters more complicated, I serve multiple domains from the same node/express instance and determine the correct site data to render based on the domainname. There were plugins and hacks to make this somewhat possible, but it felt like going against the philosophy of nuxt.js. I still think it's a fantastic framework if your needs align with this type of routing. I ended up using the Vue SSR HackerNews repo as a template.
- Raxen1 8y agoYou can use custom routing and its actually recommended for bigger projects you can check it here if you want https://vuejsdevelopers.com/2018/07/16/7-tips-large-nuxt-app-vue/ https://vuejsdevelopers.com/2018/07/16/7-tips-large-nuxt-app...
- adevx 8y agoThanks for the link. Good to see this is much easier now.