WebOptimizer icon indicating copy to clipboard operation
WebOptimizer copied to clipboard

SCSS extension must not be changed to CSS

Open xperiandri opened this issue 3 years ago • 0 comments

https://github.com/ligershark/WebOptimizer/blob/32708323bd53836b4a43837b0f8b80673c9db736/src/WebOptimizer.Core/Taghelpers/LinkTagHelper.cs#L102

Otherwise, how will the link work?

Imagine that I have

pipeline
    .AddScssBundle(options, "/SecretCircle.BmwTheme/app.css", "Areas/SecretCircle.BmwTheme/wwwroot/styles/app.scss")
    .UseContentRoot();

This means that the tag helper will rewrite <link rel="stylesheet" href="/SecretCircle.BmwTheme/app.css" /> to <link rel="stylesheet" href=""Areas/SecretCircle.BmwTheme/wwwroot/styles/app.css" />

But even if I add

pipeline
    .CompileScssFiles(options, "Areas/SecretCircle.BmwTheme/wwwroot/styles/app.scss")
    Select(asset => asset.UseContentRoot())
    ToImmutableArray();

it won't work if access Areas/SecretCircle.BmwTheme/wwwroot/styles/app.css" only if I access Areas/SecretCircle.BmwTheme/wwwroot/styles/app.scss`

Do I miss something?

xperiandri avatar Feb 25 '21 22:02 xperiandri