我已从 Agular 11 升级到 12,每个 SVG 文件都出现以下错误。
错误:模块解析失败:意外的标记 (1:0) 您可能需要适当的加载程序来处理此文件类型,当前没有配置加载程序来处理此文件。
例如 SVG 文件
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48">
<linearGradient id="linear-gradient-searchquery" x1="-5.5" y1="41.5" x2="35" y2="1" gradientTransform="matrix(1, 0, 0, -1, 0, 48)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff"/>
<stop offset="0.232" stop-color="#fafafa"/>
<stop offset="0.496" stop-color="#ededed"/>
<stop offset="0.775" stop-color="#d6d6d6"/>
<stop offset="1" stop-color="#bebebe"/>
</linearGradient>
<linearGradient id="paper_gradient-searchquery" data-name="paper gradient" x1="19.25" y1="44.25" x2="32.25" y2="31.25" gradientTransform="matrix(1, 0, 0, -1, 0, 48)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff"/>
<stop offset="0.221" stop-color="#f8f8f8"/>
<stop offset="0.541" stop-color="#e5e5e5"/>
<stop offset="0.92" stop-color="#c6c6c6"/>
<stop …Run Code Online (Sandbox Code Playgroud)