feat: Update dependencies and add new voice

- Updates project dependencies to latest versions for improved performance and security.
- Adds a new voice option, 'Aoede', to the available voices.
- Modifies the voice change handler to force re-generation of future audio segments for the selected article.
- Updates Vite configuration to align with newer Vite versions and load environment variables correctly.
- Adjusts TypeScript configuration for a more modern setup.
- Removes unnecessary configuration from Nginx file.
This commit is contained in:
Anthony
2025-11-19 20:46:02 +08:00
parent 0b10d71554
commit 43435166f8
9 changed files with 80 additions and 55 deletions

View File

@@ -1,23 +1,16 @@
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
server: {
port: 3000,
host: '0.0.0.0',
},
plugins: [react()],
define: {
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
}
}
};
});
// Load env file based on `mode` in the current working directory.
const env = loadEnv(mode, (process as any).cwd(), '');
return {
plugins: [react()],
define: {
// This allows the app code to continue using process.env.API_KEY
// even though it is running in the browser.
'process.env.API_KEY': JSON.stringify(env.API_KEY)
}
};
});