Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not recompile after saving scss files #212

Open
BlueDragon709 opened this issue Dec 6, 2024 · 1 comment
Open

Does not recompile after saving scss files #212

BlueDragon709 opened this issue Dec 6, 2024 · 1 comment

Comments

@BlueDragon709
Copy link

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.

@sleeuwen
Copy link
Collaborator

I've double checked this with a new sample and the latest version of the package, and as long as you have services.AddSassCompiler() it should recompile the scss to css. You will still have to manually refresh the page though.

If it still doesn't work for you, then it would be helpful if you could share the minimal project structure which reproduces your problem (e.g. in a github repo we can clone)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants