Reputation: 607
I see the option to DisableScopedCssBundling but do not see a way to disable this feature completely.
Upvotes: 2
Views: 2417
Reputation: 2494
According to Microsoft there is a way to disable it:
<ScopedCssEnabled>false</ScopedCssEnabled>
Upvotes: 1
Reputation: 20489
To disable it completely:
<PropertyGroup>
<ScopedCssEnabled>false</ScopedCssEnabled>
</PropertyGroup>
To enable it, but disable bundling:
<PropertyGroup>
<DisableScopedCssBundling>true</DisableScopedCssBundling>
</PropertyGroup>
By the way, to those who commented that it doesn't hurt, and can simply be ignored... I disagree. If there's a feature one doesn't use, which is known to thrash one's disk - it creates many files on every build, and also when using hot reload - then it's a good idea to disable it.
Upvotes: 0
Reputation: 283
You can disable this feature by adding the following in csproj file
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ScopedCssEnabled>false</ScopedCssEnabled>
Add false to disable
Upvotes: 4
Reputation: 942
You can't disable it and you don't need to.
If you don't want your CSS to be isolated, you can create a css file and have a <link>
tag in your component or just use the <style>
tag in your component like it was mentioned here.
Upvotes: -1
Reputation: 5603
I don't think there's a way to disable it, but, on the other hand, you don't need to.
If you don't use it, it will not have effect.
It "works" build-time only, so it won't have overhead for you at runtime.
Upvotes: 4