4.x 就绪

This commit is contained in:
啊平 2021-11-28 22:20:13 +08:00
parent 20d6084897
commit 7b458f8303
3 changed files with 5 additions and 6 deletions

View File

@ -8,10 +8,10 @@
"@midwayjs/core": "^2.13.4",
"@midwayjs/decorator": "^2.13.2",
"@midwayjs/orm": "^2.13.4",
"@midwayjs/view-nunjucks": "^2.13.4",
"@midwayjs/web": "^2.13.4",
"egg": "^2.32.0",
"egg-scripts": "^2.15.2",
"egg-view-nunjucks": "^2.3.0",
"ipip-ipdb": "^0.6.0",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",

View File

@ -1,11 +1,7 @@
import { EggPlugin } from 'egg';
export default {
static: true, // default is true
view: true,
view: false,
schedule: true,
nunjucks: {
enable: true,
package: 'egg-view-nunjucks',
},
logrotator: false, // disable when use @midwayjs/logger
} as EggPlugin;

View File

@ -1,6 +1,7 @@
import { App, Configuration } from '@midwayjs/decorator';
import { ILifeCycle, IMidwayContainer } from '@midwayjs/core';
import { Application } from 'egg';
import * as view from '@midwayjs/view-nunjucks';
import * as orm from '@midwayjs/orm';
import * as cool from 'midwayjs-cool-core';
// import * as wxpay from 'midwayjs-cool-wxpay';
@ -13,6 +14,8 @@ import * as oss from 'midwayjs-cool-oss';
@Configuration({
// 注意组件顺序 cool 有依赖orm组件 所以必须放在orm组件之后 cool的其他组件必须放在cool 核心组件之后
imports: [
// 模板渲染
view,
// 必须,不可移除, https://typeorm.io 打不开? https://typeorm.biunav.com/zh/
orm,
// 必须,不可移除, cool-admin 官方组件 https://www.cool-js.com