官方文档 Documentation | NestJS - A progressive Node.js framework
// nest-cli.json{"collection": "@nestjs/schematics","sourceRoot": "src","compilerOptions": {"assets": ["microservices/mail/templates/" ],"watchAssets": true}
}
原因:assets路径应该是相对于sourceRoot的相对路径
typescript - Configure nest-cli.json to include non TS file into the dist folder - Stack Overflowhttps://stackoverflow.com/questions/68404610/configure-nest-cli-json-to-include-non-ts-file-into-the-dist-folder