File tree 1 file changed +5
-1
lines changed
src/Razor/Microsoft.AspNetCore.Razor.Language/src 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ public static RazorProjectEngine Create(
112
112
AddDefaultPhases ( builder . Phases ) ;
113
113
AddDefaultFeatures ( builder . Features ) ;
114
114
115
+ if ( configuration . LanguageVersion . CompareTo ( RazorLanguageVersion . Version_5_0 ) >= 0 )
116
+ {
117
+ builder . Features . Add ( new ViewCssScopePass ( ) ) ;
118
+ }
119
+
115
120
if ( configuration . LanguageVersion . CompareTo ( RazorLanguageVersion . Version_3_0 ) >= 0 )
116
121
{
117
122
FunctionsDirective . Register ( builder ) ;
@@ -172,7 +177,6 @@ private static void AddDefaultFeatures(ICollection<IRazorFeature> features)
172
177
features . Add ( new DefaultTagHelperOptimizationPass ( ) ) ;
173
178
features . Add ( new PreallocatedTagHelperAttributeOptimizationPass ( ) ) ;
174
179
features . Add ( new EliminateMethodBodyPass ( ) ) ;
175
- features . Add ( new ViewCssScopePass ( ) ) ;
176
180
177
181
// Default Code Target Extensions
178
182
var targetExtensionFeature = new DefaultRazorTargetExtensionFeature ( ) ;
You can’t perform that action at this time.
0 commit comments