feat(login): 添加API地址配置功能并支持本地存储 fix(api): 移除CWD_CONFIG_KV相关配置改用数据库存储 fix(cors): 修改跨域配置允许所有来源 perf(email): 添加邮件发送日志记录和调试信息 perf(comments): 优化评论提交和邮件通知逻辑 docs(backend): 更新后端配置文档移除CWD_CONFIG_KV相关说明 chore: 更新端口号和示例配置
33 lines
614 B
JavaScript
33 lines
614 B
JavaScript
import { defineConfig } from 'vite';
|
|
import { resolve } from 'path';
|
|
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
|
|
|
|
export default defineConfig({
|
|
plugins: [cssInjectedByJsPlugin()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
name: 'CWDComments',
|
|
entry: resolve(__dirname, 'src/index.js'),
|
|
formats: ['umd'],
|
|
fileName: (format) => `cwd-comments.js`,
|
|
},
|
|
rollupOptions: {
|
|
output: {
|
|
exports: 'named',
|
|
},
|
|
},
|
|
sourcemap: false,
|
|
minify: 'terser',
|
|
terserOptions: {
|
|
compress: {
|
|
drop_console: false,
|
|
},
|
|
},
|
|
},
|
|
});
|