excubo-ag / WebCompiler

Apache License 2.0
148 stars 29 forks source link

Nuget Scss import #72

Closed Baklap4 closed 1 year ago

Baklap4 commented 1 year ago

Hello,

I've ran into the issue that i'm trying to reference a scss file from a nuget package (devexpress.blazor.themes in this case). And saw that the original webcompiler had this issue: https://github.com/madskristensen/WebCompiler/issues/480

Basicly what i'm wondering is: Can we in fact import a scss file from an installed nuget package and use it within our site.scss

When trying this we run into the issue that the scss file cannot be found thus reproducing above issue with the latest excubo webcompiler.

stefanloerwald commented 1 year ago

This is beyond the control of the compiler. The files in _content literally don't exist. This is all magic that comes in when an app is deployed, so much later in the build and deploy process.

What you will have to do if you want to rely on scss from packages is to find the correct path (i.e. the nuget package folder). Then you can either reference that path in your scss or use a build target to copy it to a different location, e.g. in your project folder.