mirror of
https://github.com/Tony0410/News-reader-pro.git
synced 2026-05-25 05:41:40 +08:00
- 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.
16 lines
505 B
TypeScript
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)
|
|
}
|
|
};
|
|
}); |