perf router template
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user