When rendering html file with hbs on nestjs, dist does not see where the file is kept

First of all, after creating a views folder where I specified in main.ts, I added my contract.hbs file in it, but I was getting an error that main.hbs cannot be found in layouts. Then I copied contract.ts and pasted it as main.hbs under views/layouts directory. Then I pasted it into dist and the rendering process worked. However, when I was making a few changes, I realized that the changes I made were not applied to the file I was rendering and while trying a few things, I got the error I showed again. I see the problem as the file not being copied to dist, but it could be something else since I don’t fully understand it.

views path: /Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/views

Error;

Error: Failed to lookup view "contract" in views directory "/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/dist/views"
    at Function.render (/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/node_modules/express/lib/application.js:597:17)
    at ServerResponse.render (/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/node_modules/express/lib/response.js:1048:7)
    at htmlContent (/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/app/routes/settings/controller/documents.controller.ts:46:21)
    at new Promise (<anonymous>)
    at DocumentsController.getContract (/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/app/routes/settings/controller/documents.controller.ts:45:39)
    at async /Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/node_modules/@nestjs/core/router/router-execution-context.js:46:28
    at async /Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/node_modules/@nestjs/core/router/router-proxy.js:9:17 {
  view: View {
    defaultEngine: 'hbs',
    ext: '.hbs',
    name: 'contract',
    root: '/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/dist/views',
    engine: [Function: bound renderView] AsyncFunction,
    path: undefined
  }
}
HttpError: Failed to lookup view "contract" in views directory "/Users/beratkaraaslan/Documents/pluspayprojects/pluspay-api-panel/dist/views"

main.ts;

   app.useStaticAssets(join(__dirname, '.', 'public'))
  app.setBaseViewsDir(join(__dirname, '.', 'views'));
  app.setViewEngine('hbs');
  app.engine('hbs', hbs({ extname: 'hbs' }));

controller.ts;

 async getContract(
        @Res() res: Response,
        @BossPlusAuthUser() user: JwtUserBossPlus,
        @Query() signature?: GetContractQueryDto
    ) {
        try {
            const data = await this.service.getContract(user, signature?.signature);

            const htmlContent = await new Promise<string>((resolve, reject) => {
                res.render('contract', data, (err, html) => {
                    if (err) {
                        reject(err);
                    } else {
                        resolve(html);
                    }
                });
            });

            const base64Content = Buffer.from(htmlContent).toString('base64');

            res.json({ base64: base64Content });
        } catch (error) {
            console.error(error);
            throw new HttpError(error.message, error.status);
        }
    }

nest-cli.json;

{
  "collection": "@nestjs/schematics",
  "sourceRoot": "app",
  "compilerOptions": {
    "assets": [
      {
        "include": "views/**/*",
        "outDir": "dist/views"
      }
    ]
  }
}

package.json;

"scripts": {
"postbuild": "cp -R views dist/views",
"start:dev": "TZ=Europe/Istanbul nest start --watch",
...
...
...
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật