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

enableTagHelperBundling=false not working for scss files #264

Open
jamezamm opened this issue Jan 27, 2023 · 2 comments
Open

enableTagHelperBundling=false not working for scss files #264

jamezamm opened this issue Jan 27, 2023 · 2 comments

Comments

@jamezamm
Copy link

jamezamm commented Jan 27, 2023

Hi,

When declaring the below scss bundle
pipe.AddScssBundle("/css/site.bundle.css", "/lib/jqueryui/jquery-ui.min.css", "/lib/bootstrap/scss/bootstrap.scss");

then disabling enableTagHelperBundling in appsettings.json
"enableTagHelperBundling": false

it gets rendered as bootstrap.css, not bootstrap.scss
<link href="/lib/jqueryui/jquery-ui.min.css?v=rByPlHULObEjJ6XQxW_flG2r-22R5dKiAoef-aXWfik" rel="stylesheet">
<link href="/lib/bootstrap/scss/bootstrap.css" rel="stylesheet">

In my case "/lib/bootstrap/scss/bootstrap.css" does not exist, therefore the browser throws a 404 not found.

Any ideas?

@jamezamm
Copy link
Author

jamezamm commented Jan 27, 2023

I have found this closed issue (ligershark/WebOptimizer.Sass#2) and I can see that the code was explicitly altered to change extension from .scss to .css. This was done in commit 6ae221a (Code below)

if (Path.GetExtension(file) == ".scss")
{
if (Path.GetFileName(file).StartsWith("_")) continue;
fileToAdd = Path.ChangeExtension(file, "css");
}

I do not understand how this would work in any scenario. Am I missing something?

@s3YwCf2ZbfJG4SHAfjQMAjtsf
Copy link

IMO, enableTagHelperBundling should load the css bundles so the browser works or the scss with the mapping.

The pages fail because we would have to reference each scss file accordingly on the page. Shouldn't enableTagHelperBundling work like Typescript vs Javascript mapping? Browser runs the javascript but makes the Typescript visible to debug with.

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