Skip to content

Does not recompile after saving scss files #212

@BlueDragon709

Description

@BlueDragon709

Describe the bug
I have added the sasscompiler as so:

#if DEBUG
    services.AddSassCompiler();
#endif

But when i debug in visual studio it compiles the scss files. But when i make a change to an scss file, it wont generate the changes to the scss files during that same debug session, making me have to restart the app every single time.
my sasscompiler.json file:

{
  "Source": "Styles",
  "Target": "wwwroot/css",
  "Arguments": "--style=compressed",
  "GenerateScopedCss": true,
  "ScopedCssFolders": [ "Views", "Pages", "Shared", "Components", "Layout" ],
  "IncludePaths": [],

  "Compilations": [
    // Or an extra directory to a different target directory
    {
      "Source": "wwwroot/lib",
      "Target": "wwwroot/css/lib"
    },
    {
      "Source": "wwwroot/scss",
      "Target": "wwwroot/css"
    }
  ],

  // You can override specific options based on the build configuration
  "Configurations": {
    "Debug": { // These options apply only to Debug builds
      "Arguments": "--style=expanded"
    }
  }
}

To Reproduce
Steps to reproduce the behavior:

  1. Start debugging in Visual Studio
  2. Load page
  3. Change SCSS file

Expected behavior
CSS recompilation of that file and working with hot reload (hot reload on file save)

Screenshots

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Edge
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22] 131.0.2903.70

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions