From 5dd5d49c7d5c2585b4f37f4e075c81cff514c55d Mon Sep 17 00:00:00 2001 From: lqqyt2423 <974923609@qq.com> Date: Thu, 10 Aug 2023 15:06:35 +0800 Subject: [PATCH] fix: app template options --- templates/app/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/app/app.js b/templates/app/app.js index 7c3927f0..0dd94669 100644 --- a/templates/app/app.js +++ b/templates/app/app.js @@ -4,7 +4,7 @@ const path = require('path') const AutoLoad = require('@fastify/autoload') // Pass --options via CLI arguments in command to enable these options. -module.exports.options = {} +const options = {} module.exports = async function (fastify, opts) { // Place here your custom code! @@ -26,3 +26,5 @@ module.exports = async function (fastify, opts) { options: Object.assign({}, opts) }) } + +module.exports.options = options