0

I don't really know hot to explain it but basically I have .hbs files which the mail resource needs. Normally they don't get copied into the dist folder when I run npm start run:dev. So I modified the nest-cli.json like this.

enter image description here

But now I have the problem that the patch which they are getting copied to are not correct.

This is how I have it in my root folder:

enter image description here

And this is where it gets copied to:

enter image description here

I´ve tried playing around with the assets path and searched for answers but I didn't find any other way of coping those files

Specht
  • 50
  • 10
  • The picture you have attached doesn't prove that `hbs` files are not under the templates directory. VSCode is doing a bit weird in showing directories that have only one sub-directory. You can double-check with your file manager to see. – Mostafa Fakhraei Jan 09 '23 at 19:31
  • Nope VSC shows it correctly there is no templates folder in src in the dist folder – Specht Jan 09 '23 at 21:09

1 Answers1

2
"compilerOptions": {    
"assets": [
  {
    "include": "/mail",
    "outDir": "dist/mail",
    "watchAssets": true
  },
],
"watchAssets": true
}

note that in your first image templates folder under mail folder is same as mail/templates in your second image. And this because you have only one folder under the parent folder

Ahmed Sbai
  • 10,695
  • 9
  • 19
  • 38
  • Thanks, ` I had to change `"outDir"` to `"dist/src/"` because the `mail` folder is located inside the `src` folder – Specht Jan 10 '23 at 19:53
  • no you don't need ! the src folder usually doesn't exist under dist. it's like considering dist as src – Ahmed Sbai Jan 10 '23 at 19:56