闪念
20240123 s3y805qk
vite-plugin-swc-transform 这个 Vite 插件能够让 Vite 正确构建带有装饰器和元数据的 TypeScript 项目。 它能让下面的编译参数正确生效。终于可以在 Vite 项目中快乐地使用 async-injection 了。 `json { "compilerOptions": { // ... "experimentalDecorators": true,...
#Develop/Vite
vite-plugin-swc-transform 这个 Vite 插件能够让 Vite 正确构建带有装饰器和元数据的 TypeScript 项目。 它能让下面的编译参数正确生效。终于可以在 Vite 项目中快乐地使用 async-injection 了。 `json { "compilerOptions": { // ... "experimentalDecorators": true,...
Vite 开发服务器反向代理 Parse Server 时,会出现较大的响应(29KiB) 被截断的问题 表现是 cURL 测试时,响应内容在固定位置停止,连接保持未断开。 经过测试,问题出在 node-http-proxy 上。使用 fast-proxy 没有出现问题。如果不使用 Parse Server 作为上游,直接用 express 返回静态的结果,在 node-http-proxy...
在Vite 配置文件中使用项目的 .env 环境变量: `ts // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }; return { your_config:...