chore: reintroduce sitemap generation (#2874)
This commit is contained in:
@@ -99,7 +99,6 @@ declare module '@vue/runtime-core' {
|
||||
HttpTests: typeof import('./components/http/Tests.vue')['default']
|
||||
HttpURLEncodedParams: typeof import('./components/http/URLEncodedParams.vue')['default']
|
||||
IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']
|
||||
IconLucideBrush: typeof import('~icons/lucide/brush')['default']
|
||||
IconLucideCheckCircle: typeof import('~icons/lucide/check-circle')['default']
|
||||
IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default']
|
||||
IconLucideGlobe: typeof import('~icons/lucide/globe')['default']
|
||||
@@ -108,11 +107,9 @@ declare module '@vue/runtime-core' {
|
||||
IconLucideLayers: typeof import('~icons/lucide/layers')['default']
|
||||
IconLucideLoader: typeof import('~icons/lucide/loader')['default']
|
||||
IconLucideMinus: typeof import('~icons/lucide/minus')['default']
|
||||
IconLucideRss: typeof import('~icons/lucide/rss')['default']
|
||||
IconLucideSearch: typeof import('~icons/lucide/search')['default']
|
||||
IconLucideUser: typeof import('~icons/lucide/user')['default']
|
||||
IconLucideUsers: typeof import('~icons/lucide/users')['default']
|
||||
IconLucideVerified: typeof import('~icons/lucide/verified')['default']
|
||||
LensesHeadersRenderer: typeof import('./components/lenses/HeadersRenderer.vue')['default']
|
||||
LensesHeadersRendererEntry: typeof import('./components/lenses/HeadersRendererEntry.vue')['default']
|
||||
LensesRenderersHTMLLensRenderer: typeof import('./components/lenses/renderers/HTMLLensRenderer.vue')['default']
|
||||
@@ -122,6 +119,7 @@ declare module '@vue/runtime-core' {
|
||||
LensesRenderersRawLensRenderer: typeof import('./components/lenses/renderers/RawLensRenderer.vue')['default']
|
||||
LensesRenderersXMLLensRenderer: typeof import('./components/lenses/renderers/XMLLensRenderer.vue')['default']
|
||||
LensesResponseBodyRenderer: typeof import('./components/lenses/ResponseBodyRenderer.vue')['default']
|
||||
Newcollections: typeof import('./components/newcollections/index.vue')['default']
|
||||
ProfilePicture: typeof import('./components/profile/Picture.vue')['default']
|
||||
ProfileShortcode: typeof import('./components/profile/Shortcode.vue')['default']
|
||||
RealtimeCommunication: typeof import('./components/realtime/Communication.vue')['default']
|
||||
|
||||
3
packages/hoppscotch-web/.gitignore
vendored
3
packages/hoppscotch-web/.gitignore
vendored
@@ -22,3 +22,6 @@ dist-ssr
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# Sitemap Generation Artifacts (see vite.config.ts)
|
||||
.sitemap-gen
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
"vite-plugin-pages": "^0.26.0",
|
||||
"vite-plugin-pages-sitemap": "^1.4.0",
|
||||
"vite-plugin-pwa": "^0.13.1",
|
||||
"vite-plugin-static-copy": "^0.12.0",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
"vite-plugin-windicss": "^1.8.8",
|
||||
"vue-tsc": "^1.0.9",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { defineConfig, loadEnv } from "vite"
|
||||
import { defineConfig, loadEnv, normalizePath } from "vite"
|
||||
import { APP_INFO, META_TAGS } from "./meta"
|
||||
// import generateSitemap from "vite-plugin-pages-sitemap"
|
||||
import { viteStaticCopy as StaticCopy } from "vite-plugin-static-copy"
|
||||
import generateSitemap from "vite-plugin-pages-sitemap"
|
||||
import HtmlConfig from "vite-plugin-html-config"
|
||||
import Vue from "@vitejs/plugin-vue"
|
||||
import VueI18n from "@intlify/vite-plugin-vue-i18n"
|
||||
@@ -73,16 +74,25 @@ export default defineConfig({
|
||||
routeStyle: "nuxt",
|
||||
dirs: "../hoppscotch-common/src/pages",
|
||||
importMode: "async",
|
||||
onRoutesGenerated() {
|
||||
// TODO: Figure this out ?
|
||||
// return generateSitemap({
|
||||
// routes,
|
||||
// nuxtStyle: true,
|
||||
// allowRobots: true,
|
||||
// hostname: ENV.VITE_BASE_URL,
|
||||
// })
|
||||
onRoutesGenerated(routes) {
|
||||
// HACK: See: https://github.com/jbaubree/vite-plugin-pages-sitemap/issues/173
|
||||
return ((generateSitemap as any).default as typeof generateSitemap)({
|
||||
routes,
|
||||
nuxtStyle: true,
|
||||
allowRobots: true,
|
||||
dest: ".sitemap-gen",
|
||||
hostname: ENV.VITE_BASE_URL,
|
||||
})
|
||||
},
|
||||
}),
|
||||
StaticCopy({
|
||||
targets: [
|
||||
{
|
||||
src: normalizePath(path.resolve(__dirname, "./.sitemap-gen/*")),
|
||||
dest: normalizePath(path.resolve(__dirname, "./dist")),
|
||||
},
|
||||
],
|
||||
}),
|
||||
Layouts({
|
||||
layoutsDirs: "../hoppscotch-common/src/layouts",
|
||||
defaultLayout: "default",
|
||||
|
||||
15
pnpm-lock.yaml
generated
15
pnpm-lock.yaml
generated
@@ -441,6 +441,7 @@ importers:
|
||||
vite-plugin-pages: ^0.26.0
|
||||
vite-plugin-pages-sitemap: ^1.4.0
|
||||
vite-plugin-pwa: ^0.13.1
|
||||
vite-plugin-static-copy: ^0.12.0
|
||||
vite-plugin-vue-layouts: ^0.7.0
|
||||
vite-plugin-windicss: ^1.8.8
|
||||
vue: ^3.2.41
|
||||
@@ -477,6 +478,7 @@ importers:
|
||||
vite-plugin-pages: 0.26.0_vite@3.2.4
|
||||
vite-plugin-pages-sitemap: 1.4.0
|
||||
vite-plugin-pwa: 0.13.1_3kw35epztoiwny7qtfesjexvtu
|
||||
vite-plugin-static-copy: 0.12.0_vite@3.2.4
|
||||
vite-plugin-vue-layouts: 0.7.0_vite@3.2.4+vue@3.2.45
|
||||
vite-plugin-windicss: 1.8.8_vite@3.2.4
|
||||
vue-tsc: 1.0.9_typescript@4.7.4
|
||||
@@ -12955,6 +12957,19 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-plugin-static-copy/0.12.0_vite@3.2.4:
|
||||
resolution: {integrity: sha512-5a8hCjYJdf/rl8s7ct/YWt97gXdGPGNSOoJtkY5IYhbnSq04X1gTt5GpFHKfAxhHoed1Grfw3Ed13t7AjJi7gw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
vite: ^3.0.0
|
||||
dependencies:
|
||||
chokidar: 3.5.3
|
||||
fast-glob: 3.2.11
|
||||
fs-extra: 10.1.0
|
||||
picocolors: 1.0.0
|
||||
vite: 3.2.4
|
||||
dev: true
|
||||
|
||||
/vite-plugin-vue-layouts/0.7.0_oewzdqozxqnqgsrjzmwikx34vi:
|
||||
resolution: {integrity: sha512-k5XDmRNFo4M/GmUjhbRXj2WmJiFcGoVI8l/uZ72RHyRDQr4wE/6Zq/KFq0lqXomWQxTSzakQRUswzNwtvZLE8A==}
|
||||
peerDependencies:
|
||||
|
||||
Reference in New Issue
Block a user