Skip to content

SCSS not compiling on time on the published website (.NET 5, IIS) #51

Open
@ThiagoMaurer

Description

ConfigureServices:


services.AddControllersWithViews().AddRazorRuntimeCompilation();

services.AddWebOptimizer(pipeline => { 
      pipeline.CompileScssFiles();
});

Configure:

app.UseWebOptimizer();

app.UseHttpsRedirection();
app.UseStaticFiles();

When I publish it to my website on IIS, the SCSS does not compile to CSS ontime. The first time that someone access the website on a certain period of time, none of the SCSS files compiles before the page shows. The pages starts to work normally after reloading it with F5. But it needs to be done on every view/page.

I dont know why this happens, it never happens when I run it locally, only on the published version.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions