d3xter-dev / sitemap-module-nuxt-3

Sitemap Module for Nuxt 3
https://sitemap.nuxtjs.org
MIT License
63 stars 12 forks source link

The generated site map does not have xml tag #5

Closed LeoonLiang closed 1 year ago

LeoonLiang commented 1 year ago

my config

modules: [
    '@nuxtjs/tailwindcss',
    '@nuxtjs/i18n',
    '@funken-studio/sitemap-nuxt-3'
  ],
  i18n: {
    strategy: 'prefix_except_default',
    locales: ['cn', 'en'], // used in URL path prefix
    defaultLocale: 'cn',   // default locale of your project for Nuxt pages and routings
    detectBrowserLanguage: {
      useCookie: true,
      fallbackLocale: 'cn',
      alwaysRedirect: true
    },
    vueI18n: {
      legacy: false,
      locale: 'cn',
      globalInjection: true,
      messages: message
    }
  },
  sitemap: {
    hostname: 'https://xxxx.xxxx.cn', 
    cacheTime: 1,
    routes: dynamicRoutes,
    i18n: true,
    defaults: {
      changefreq: 'daily',
      priority: 1,
      lastmod: new Date().toISOString(),
    },
  },

the element

image

It works when I swap the location of '@nuxtjs/i18n' and '@funken-studio/sitemap-nuxt-3', but sitemap i18n option is broken。 Please take a look, thanks!