perf router template

This commit is contained in:
2025-04-07 14:36:52 +08:00
parent 117be3062d
commit 6807388ab5
18 changed files with 996 additions and 464 deletions

View File

@@ -8,7 +8,7 @@ import replace from '@rollup/plugin-replace';
import pkgs from './package.json' with {type: 'json'};
const isDev = process.env.NODE_ENV === 'development';
const input = isDev ? './src/dev.ts' : './src/index.ts';
const input = isDev ? './src/dev.ts' : './src/main.ts';
/**
* @type {import('rollup').RollupOptions}
*/
@@ -24,7 +24,7 @@ const config = {
replace({
preventAssignment: true, // 防止意外赋值
DEV_SERVER: JSON.stringify(isDev), // 替换 process.env.NODE_ENV
VERSION: JSON.stringify(pkgs.version),
APP_VERSION: JSON.stringify(pkgs.version),
}),
alias({
// only esbuild needs to be configured
@@ -67,9 +67,9 @@ const config = {
/@kevisual\/router(\/.*)?/, //, // 路由
/@kevisual\/use-config(\/.*)?/, //
// 'sequelize', // 数据库 orm
// 'ioredis', // redis
// 'pg', // pg
'sequelize', // 数据库 orm
'ioredis', // redis
'pg', // pg
],
};
export default config;