Skip to content

Commit

Permalink
perf(bootstrap): set onlyone view extension
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Aug 13, 2022
1 parent d092081 commit dec0abd
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@
"dayjs": "1.11.4",
"ejs": "^3.1.8",
"entities": "^4.3.1",
"file-type": "^17.1.6",
"handlebars": "^4.7.7",
"i": "^0.3.7",
"image-size": "^1.0.2",
"js-yaml": "^4.1.0",
"jszip": "^3.10.0",
"lodash": "*",
"marked": "^4.0.18",
"mime": "^3.0.0",
"mkdirp": "^1.0.4",
"mongoose": "6.5.0",
"mongoose-aggregate-paginate-v2": "1.0.6",
Expand Down Expand Up @@ -121,6 +123,7 @@
"@types/js-yaml": "^4.0.5",
"@types/lodash": "4.14.182",
"@types/marked": "^4.0.3",
"@types/mime": "^3.0.1",
"@types/mongoose-aggregate-paginate-v2": "^1.0.5",
"@types/node": "17.0.24",
"@types/nodemailer": "6.4.5",
Expand Down
59 changes: 58 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function bootstrap() {
ejs: require("ejs"),
},
templates: join(THEME_DIR), // 模板目录,模板名字应在 Render 中指定
viewExt: "ejs",
viewExt: "ejs", // 模板文件的后缀名
defaultContext: {
dev: process.env.NODE_ENV === "development",
},
Expand Down

0 comments on commit dec0abd

Please sign in to comment.