Add sitemap to build

This commit is contained in:
Misode
2021-10-04 17:43:46 +02:00
parent a014d7a5c7
commit c7d5b06825
5 changed files with 239 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import preact from '@preact/preset-vite'
import html from '@rollup/plugin-html'
import config from './src/config.json'
import { env } from 'process'
import copy from 'rollup-plugin-copy'
export default defineConfig({
build: {
@@ -19,6 +20,12 @@ export default defineConfig({
title: getTitle(m),
template: template,
})),
copy({
targets: [
{ src: 'src/sitemap.txt', dest: 'dist' }
],
hook: 'writeBundle'
})
],
},
},