Issues (306)

docs/docs/vite.config.js (1 issue)

Labels
Severity
1
import { defineConfig } from 'vite'
2
import SitemapPlugin from 'rollup-plugin-sitemap'
3
import VitePressConfig from './.vitepress/config.js'
4
5
const docsSiteBaseUrl = 'https://nystudio107.com'
6
const docsBaseUrl = new URL(VitePressConfig.base, docsSiteBaseUrl).href.replace(/\/$/, '') + '/'
0 ignored issues
show
The variable URL seems to be never declared. If this is a global, consider adding a /** global: URL */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
7
const siteMapRoutes = VitePressConfig.themeConfig.sidebar.map(element => ({
8
  path: element.link.replace(/^\/+/, ''),
9
  name: element.text
10
}))
11
12
// https://vitejs.dev/config/
13
export default defineConfig({
14
  plugins: [
15
    SitemapPlugin({
16
      baseUrl: docsBaseUrl,
17
      contentBase: './docs/.vitepress/dist',
18
      routes: siteMapRoutes,
19
    })
20
  ],
21
  server: {
22
    host: '0.0.0.0',
23
    port: 3002,
24
    strictPort: true,
25
  }
26
});
27