n0mbers/vite.config.ts

61 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-02-15 08:46:02 +01:00
import vueI18n from '@intlify/vite-plugin-vue-i18n'
2022-02-09 21:27:26 +01:00
import vue from '@vitejs/plugin-vue'
2022-02-15 08:46:02 +01:00
import path from 'path'
2022-02-09 22:10:58 +01:00
import Icons from 'unplugin-icons/vite'
2022-02-09 21:27:26 +01:00
import { fileURLToPath, URL } from 'url'
import { defineConfig } from 'vite'
2022-02-22 12:33:10 +01:00
import { VitePWA } from 'vite-plugin-pwa'
process.env.VITE_BUILD_DATE = new Date().toISOString()
2022-02-07 22:14:31 +01:00
// https://vitejs.dev/config/
export default defineConfig({
2022-02-24 22:41:32 +01:00
base: '/',
2022-02-11 19:15:01 +01:00
plugins: [
vue({
reactivityTransform: true,
}),
Icons({ autoInstall: true }),
2022-02-15 08:46:02 +01:00
vueI18n({
include: path.resolve(__dirname, 'src/locales/**'),
}),
2022-02-22 12:33:10 +01:00
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',
},
],
},
}),
2022-02-11 19:15:01 +01:00
],
2022-02-07 22:14:31 +01:00
resolve: {
alias: {
2022-02-09 21:27:26 +01:00
'@': fileURLToPath(new URL('./src', import.meta.url)),
2022-02-07 22:14:31 +01:00
},
},
2022-02-09 21:27:26 +01:00
})