import vueI18n from '@intlify/vite-plugin-vue-i18n' import vue from '@vitejs/plugin-vue' import path from 'path' import Icons from 'unplugin-icons/vite' import { fileURLToPath, URL } from 'url' import { defineConfig } from 'vite' import { VitePWA } from 'vite-plugin-pwa' process.env.VITE_BUILD_DATE = new Date().toISOString() // https://vitejs.dev/config/ export default defineConfig({ base: '/', plugins: [ vue({ reactivityTransform: true, }), Icons({ autoInstall: true }), vueI18n({ include: path.resolve(__dirname, 'src/locales/**'), }), VitePWA({ registerType: 'autoUpdate', includeAssets: [ 'icons/favicon.ico', 'robots.txt', 'icons/apple-touch-icon.png', ], manifest: { name: 'N0mbers', short_name: 'N0mbers', description: 'Reach the result in five operations or less', theme_color: '#198A42', icons: [ { src: 'icons/android-chrome-192x192.png', sizes: '192x192', type: 'image/png', }, { src: 'icons/android-chrome-512x512.png', sizes: '512x512', type: 'image/png', }, { src: 'icons/android-chrome-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable', }, ], }, }), ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, })