mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
05f1b2f9a8
- Introduced new backup recommendations feature with interfaces for recommended storage providers. - Updated i18n translations for backup strategy to reflect new terminology and improved descriptions. - Enhanced types with optional private and public keys in user profiles. - Redesigned backup-related styles for better layout and responsiveness. - Updated TypeScript configuration to include shared modules. - Configured Vite to resolve shared modules and allow filesystem access. - Added cron triggers for periodic tasks in Wrangler configuration.
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import path from 'node:path';
|
|
import preact from '@preact/preset-vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
const rootDir = fileURLToPath(new URL('.', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
root: rootDir,
|
|
plugins: [preact()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(rootDir, 'src'),
|
|
'@shared': path.resolve(rootDir, '../shared'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: path.resolve(rootDir, '../dist'),
|
|
emptyOutDir: true,
|
|
sourcemap: false,
|
|
target: 'esnext',
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['preact', 'preact/hooks', 'preact/jsx-runtime'],
|
|
query: ['@tanstack/react-query'],
|
|
icons: ['lucide-preact'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
fs: {
|
|
allow: [path.resolve(rootDir, '..')],
|
|
},
|
|
proxy: {
|
|
'/api': 'http://127.0.0.1:8787',
|
|
'/identity': 'http://127.0.0.1:8787',
|
|
'/setup': 'http://127.0.0.1:8787',
|
|
'/icons': 'http://127.0.0.1:8787',
|
|
'/config': 'http://127.0.0.1:8787',
|
|
'/notifications': 'http://127.0.0.1:8787',
|
|
'/.well-known': 'http://127.0.0.1:8787',
|
|
},
|
|
},
|
|
});
|