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.
This commit is contained in:
2026-02-05 14:25:54 +08:00
parent d15a658466
commit 63d8ab8ff0
10 changed files with 793 additions and 8 deletions

15
vite.config.ts Normal file
View File

@@ -0,0 +1,15 @@
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 || ''),
}
};
});