昨天,当我将我的网站上传到 azure 作为开发分支时,我捆绑了我的脚本和样式,然后我面临字体警告(无法解码下载的字体)你可以在这里看到。在我的 web.config 我有这个静态内容
<staticContent>
<remove fileExtension=".air" />
<mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<remove fileExtension=".ttf" />
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
<remove fileExtension=".less" />
<mimeMap fileExtension=".less" mimeType="text/css" />
<remove fileExtension=".mp4" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
我的一个css文件是这个
@font-face {
font-family: 'Simple-Line-Icons';
src:url('fonts/Simple-Line-Icons.eot');
src:url('fonts/Simple-Line-Icons.eot?#iefix') format('embedded-opentype'),
url('fonts/Simple-Line-Icons.woff') format('woff'),
url('fonts/Simple-Line-Icons.ttf') format('truetype'),
url('fonts/Simple-Line-Icons.svg#Simple-Line-Icons') format('svg');
font-weight: normal;
font-style: normal;
}