Files
news-reader-actions-test/vite.config.ts
Anthony 43435166f8 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.
2025-11-19 20:46:02 +08:00

16 lines
505 B
TypeScript

import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
// 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)
}
};
});