소스 검색

rollback (prefer woff2 over woff)

Gildas 7 년 전
부모
커밋
5169d4f6da
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      lib/single-file/css-fonts-minifier.js

+ 3 - 3
lib/single-file/css-fonts-minifier.js

@@ -226,12 +226,12 @@ this.fontsMinifier = this.fontsMinifier || (() => {
 		});
 		const fontTest = (fontSource, format) => fontSource.src != EMPTY_URL_SOURCE && fontSource.format == format;
 		let woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff2-variations"));
-		if (!woffFontFound) {
-			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff"));
-		}
 		if (!woffFontFound) {
 			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff2"));
 		}
+		if (!woffFontFound) {
+			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff"));
+		}		
 		stats.fonts.processed += fontSources.length;
 		stats.fonts.discarded += fontSources.length;
 		if (woffFontFound) {