revite/vite.config.ts

46 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-06-18 10:35:35 -04:00
import { resolve } from 'path'
2021-06-18 07:05:01 -04:00
import { defineConfig } from 'vite'
import preact from '@preact/preset-vite'
2021-06-18 14:25:33 -04:00
import { VitePWA } from 'vite-plugin-pwa'
2021-06-18 07:05:01 -04:00
// https://vitejs.dev/config/
export default defineConfig({
2021-06-18 14:25:33 -04:00
plugins: [
preact(),
VitePWA({
manifest: {
name: "Revolt",
short_name: "Revolt",
description: "User-first, privacy-focused chat platform.",
categories: ["messaging"],
start_url: "/",
display: "standalone",
orientation: "portrait",
background_color: "#101823",
icons: [
{
"src": "/assets/icons/android-chrome-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/assets/icons/android-chrome-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
]
},
workbox: { }
})
],
2021-06-18 10:35:35 -04:00
build: {
2021-06-19 07:34:53 -04:00
sourcemap: true,
2021-06-18 10:35:35 -04:00
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
ui: resolve(__dirname, 'ui/index.html')
}
}
}
2021-06-18 07:05:01 -04:00
})