Files
light-code-demo/vite.config.ts
abearxiong 63d8ab8ff0 feat: add remote app functionality and environment configuration
- Introduced a new HTML file for the light code demo.
- Added TypeScript definitions for environment variables.
- Implemented remote app logic for both browser and node environments.
- Configured Vite to load environment variables and define KEVISUAL_TOKEN.
- Updated README with relevant information about the project structure and usage.
2026-02-05 14:25:54 +08:00

15 lines
381 B
TypeScript

import { defineConfig, loadEnv } from 'vite';
import dotenv from 'dotenv';
dotenv.config();
export default defineConfig(({ mode }) => {
// const env = loadEnv(mode, process.cwd());
console.log('KEVISUAL_TOKEN:', mode, process.env.KEVISUAL_TOKEN);
return {
base: '/',
define: {
'KEVISUAL_TOKEN': JSON.stringify(process.env.KEVISUAL_TOKEN || ''),
}
};
});