mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-06 20:32:55 +08:00
65 lines
1.4 KiB
JavaScript
65 lines
1.4 KiB
JavaScript
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import { splitVendorChunkPlugin } from 'vite';
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
build: {
|
|
outDir: '../dist',
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
splitVendorChunkPlugin(),
|
|
AutoImport({
|
|
imports: [
|
|
'vue',
|
|
{
|
|
'naive-ui': [
|
|
'useMessage',
|
|
'NButton',
|
|
'NPopconfirm',
|
|
'NIcon',
|
|
]
|
|
}
|
|
]
|
|
}),
|
|
Components({
|
|
resolvers: [NaiveUiResolver()]
|
|
}),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
devOptions: {
|
|
enabled: true
|
|
},
|
|
workbox: {
|
|
disableDevLogs: true,
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
|
|
},
|
|
manifest: {
|
|
name: 'Temp Email',
|
|
short_name: 'Temp Email',
|
|
description: 'Temp Email - Temporary Email',
|
|
theme_color: '#ffffff',
|
|
icons: [
|
|
{
|
|
src: '/logo.png',
|
|
sizes: '192x192',
|
|
type: 'image/png'
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
}
|
|
})
|