AspNet Core and customising SASS files

We are using CoreUI template in an AspNet Core website. We have pulled the CoreUI files from GitHub and reference the CoreUI CSS using

In development and

In production. This all works up until the point where we want to start changing defaults such as the Primary colours.

Under the “wwwroot” folder we have a “CoreUI” folder and there is also a “coreui” folder under the “wwwroot\lib” folder. Why are there two CoreUi folders, which one should we edit?

It is quite some time since I have worked with SASS. Should we be edititing the _custom.scss and _variables.scss?

Once we do edit the right files how to configure ASPNet or MSBuild to action those SASS files? I am correct in saying the SCSS files generate the CSS files?

Thanks