From 2d2cb97905f7f787911a7175597a10ddd1bc5cf8 Mon Sep 17 00:00:00 2001 From: Zyao89 Date: Thu, 18 Jan 2024 15:38:16 +0800 Subject: [PATCH] feat: support ts --- src/plugins/docs/swagger.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/docs/swagger.js b/src/plugins/docs/swagger.js index 1c13c1f..0b7bc02 100644 --- a/src/plugins/docs/swagger.js +++ b/src/plugins/docs/swagger.js @@ -25,10 +25,10 @@ function swaggerOptionsFactory(spec, config) { }, // Path to the API docs apis: [ - path.resolve(root, 'src/**/*.js'), - path.resolve(__dirname, '**/*.js'), + path.resolve(root, 'src/**/*.[j|t]s'), + path.resolve(__dirname, '**/*.[j|t]s'), ].concat(process.env.DOCS_SWAGGER_ROOT ? [ - path.resolve(process.env.DOCS_SWAGGER_ROOT, '**/*.js'), + path.resolve(process.env.DOCS_SWAGGER_ROOT, '**/*.[j|t]s'), ] : []), }; }