Webpack “OTS parsing error” loading fonts

前端 未结 13 1073
[愿得一人]
[愿得一人] 2020-11-28 20:51

My webpack config specifies that fonts should be loaded using url-loader, and when I try to view the page using Chrome I get the following error:



        
相关标签:
13条回答
  • 2020-11-28 21:33

    If you're using Angular you need to check to make sure your

    <base href="/"> 
    

    tag comes before your style sheet bundle. I switched my code from this:

     <script src="~/bundles/style.bundle.js"></script>
     <base href="~/" />
    

    to this:

     <base href="~/" />
     <script src="~/bundles/style.bundle.js"></script>
    

    and the problem was fixed. Thanks to this post for opening my eyes.

    0 讨论(0)
提交回复
热议问题