mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-09 21:27:47 +02:00
add static site generation including robots.txt and sitemap.xml
This commit is contained in:
@@ -18,7 +18,12 @@ import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import {resolve as pathResolver} from "path";
|
||||
import terser from "@rollup/plugin-terser";
|
||||
import ViteSSGOptions from "vite-ssg";
|
||||
import generateSitemap from 'vite-ssg-sitemap'
|
||||
|
||||
const hostname = "https://cal.htwk-leipzig.de";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -28,8 +33,27 @@ export default defineConfig({
|
||||
terser(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
alias:
|
||||
{
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
'primevue' : pathResolver(__dirname, 'node_modules/primevue'),
|
||||
},
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.css', '.scss'],
|
||||
},
|
||||
ssgOptions: {
|
||||
script: "async",
|
||||
formatting: "minify",
|
||||
format: "esm",
|
||||
onFinished: () => {
|
||||
generateSitemap({
|
||||
hostname: hostname,
|
||||
exclude: [
|
||||
'/additional-modules',
|
||||
'/edit-additional-modules',
|
||||
'/edit-calendar',
|
||||
'/rename-modules',
|
||||
]
|
||||
})
|
||||
},
|
||||
},
|
||||
server: {
|
||||
|
Reference in New Issue
Block a user