
- Introduced a new `notes.md` file to document critical tasks and progress for stabilizing the core functionality of the MitList application. - Documented the status and findings for key tasks, including backend financial logic fixes, frontend expense split settlement implementation, and core authentication flow reviews. - Outlined remaining work for production deployment, including secret management, CI/CD pipeline setup, and performance optimizations. - Updated the logging configuration to change the log level to WARNING for production readiness. - Enhanced the database connection settings to disable SQL query logging in production. - Added a new endpoint to list all chores for improved user experience and optimized database queries. - Implemented various CRUD operations for chore assignments, including creation, retrieval, updating, and deletion. - Updated frontend components and services to support new chore assignment features and improved error handling. - Enhanced the expense management system with new fields and improved API interactions for better user experience.
79 lines
2.2 KiB
TypeScript
79 lines
2.2 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { VitePWA, VitePWAOptions } from 'vite-plugin-pwa';
|
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
import { fileURLToPath, URL } from 'node:url';
|
|
import path from 'node:path';
|
|
|
|
const pwaOptions: Partial<VitePWAOptions> = {
|
|
registerType: 'autoUpdate',
|
|
strategies: 'injectManifest',
|
|
srcDir: 'src',
|
|
filename: 'sw.ts',
|
|
devOptions: {
|
|
enabled: true,
|
|
type: 'module',
|
|
navigateFallback: 'index.html',
|
|
suppressWarnings: true,
|
|
},
|
|
manifest: {
|
|
name: 'mitlist',
|
|
short_name: 'mitlist',
|
|
description: 'mitlist pwa',
|
|
theme_color: '#027be3',
|
|
background_color: '#ffffff',
|
|
display: 'standalone',
|
|
orientation: 'portrait',
|
|
icons: [
|
|
{ src: 'icons/icon-128x128.png', sizes: '128x128', type: 'image/png' },
|
|
{ src: 'icons/icon-192x192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: 'icons/icon-256x256.png', sizes: '256x256', type: 'image/png' },
|
|
{ src: 'icons/icon-384x384.png', sizes: '384x384', type: 'image/png' },
|
|
{ src: 'icons/icon-512x512.png', sizes: '512x512', type: 'image/png' },
|
|
],
|
|
},
|
|
injectManifest: {
|
|
globPatterns: [
|
|
'**/*.{js,css,html,ico,png,svg,woff2}',
|
|
'offline.html',
|
|
],
|
|
globIgnores: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'sw.js',
|
|
'dev-sw.js',
|
|
'index.html',
|
|
],
|
|
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB
|
|
},
|
|
workbox: {
|
|
cleanupOutdatedCaches: true,
|
|
sourcemap: true,
|
|
},
|
|
};
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
VitePWA(pwaOptions),
|
|
VueI18nPlugin({
|
|
include: [path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/i18n/**')],
|
|
strictMessage: false,
|
|
runtimeOnly: false,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
define: {
|
|
__PWA_FALLBACK_HTML__: JSON.stringify('/index.html'),
|
|
__PWA_SERVICE_WORKER_REGEX__: JSON.stringify('^(sw|workbox)-.*\\.js$'),
|
|
'process.env.MODE': JSON.stringify(process.env.NODE_ENV),
|
|
'process.env.PROD': JSON.stringify(process.env.NODE_ENV === 'production'),
|
|
},
|
|
server: {
|
|
open: true,
|
|
},
|
|
}); |