1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-13 22:00:28 +05:30
Piped/vite.config.js

54 lines
1.7 KiB
JavaScript
Raw Normal View History

2021-12-28 20:09:20 +05:30
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import WindiCSS from "vite-plugin-windicss";
import vueI18n from "@intlify/vite-plugin-vue-i18n";
2021-12-28 20:29:58 +05:30
import { VitePWA } from "vite-plugin-pwa";
2021-12-28 20:09:20 +05:30
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
WindiCSS(),
vueI18n({
include: path.resolve(__dirname, "./src/locales/**"),
}),
2021-12-29 01:09:02 +05:30
VitePWA({
registerType: "autoUpdate",
workbox: {
globPatterns: ["**/*.{js,css,html,ico,svg,png}", "manifest.webmanifest"],
},
manifest: {
name: "Piped",
short_name: "Piped",
background_color: "#000000",
theme_color: "#fa4b4b",
icons: [
{ src: "./img/icons/android-chrome-192x192.png", sizes: "192x192", type: "image/png" },
{ src: "./img/icons/android-chrome-512x512.png", sizes: "512x512", type: "image/png" },
{
src: "./img/icons/android-chrome-maskable-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
},
{
src: "./img/icons/android-chrome-maskable-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
}),
2021-12-28 20:09:20 +05:30
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
2021-12-29 00:24:28 +05:30
build: {
sourcemap: true,
},
2021-12-28 20:09:20 +05:30
});