- 新增Redis集成模块,支持心跳写入与控制台日志队列 - 优化Kafka消费者实现,支持多实例与自动重连 - 改进消息处理器,支持批量处理与多层解码 - 更新数据库表结构,调整字段类型与约束 - 添加Redis与Kafka的配置项和环境变量支持 - 补充测试用例和文档说明
29 lines
716 B
JavaScript
29 lines
716 B
JavaScript
import { defineConfig } from 'vite';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.js'),
|
|
name: 'WebBLSHeartbeatServer',
|
|
formats: ['es'],
|
|
fileName: (format) => `index.${format}.js`
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'kafka-node', 'pg', 'redis',
|
|
// Node.js core modules
|
|
'events', 'url', 'crypto', 'util', 'net', 'tls', 'buffer', 'path',
|
|
'node:zlib',
|
|
// openspec is not actually used in the code, remove it
|
|
],
|
|
output: {
|
|
globals: {
|
|
'kafka-node': 'KafkaNode',
|
|
'pg': 'Pg',
|
|
'redis': 'Redis'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}); |