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
|
|||
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 |
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.