0

Just wondering what is the difference between

import { getContent } from '@/assets/welcome-content.js'
import Navigation from '@/components/Navigation'

and

import { getContent } from '~/assets/welcome-content.js'
import Navigation from '~/components/Navigation'

Both seems to work but when I add the lines below in nuxt.config.js

router: {
     base: '/siteA/'
   },

I have the following error :

Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/".

Context : I have 3 nuxt website that I want to put under the same domain

  • mysite.fr/siteA/
  • mysite.fr/siteB/
  • mysite.fr/siteC/

As for my Nginx conf

server {
    ...
    server_name example.com;
    ...
    location /siteA {
        root /var/www/siteA/dist;
        ...
    }
    location /siteB {
        root /var/www/siteB/dist;
        ...
    }
    ...
}
Anonymous Asked question May 14, 2021