react引入semantic-ui-css/semantic.css报错

报错内容

TypeError: Cannot read property 'get' of undefined
during rendering of asset asset/inline|data:application/x-font-ttf;charset=utf-8;;base64,AAEAAAAOAIAAAwBgT1Mv...

 方法1:

将node_modules/semantic-ui-css/semantic.css 的19990行删除

The main reason for this is an extra ";" at line 19990 of semantic.css
If removed, everything goes fine.

@font-face {
  font-family: 'Step';
  src: url(data:application/x-font-ttf;charset=utf-8;;base64,AAEAAAAOAIAAAw... // this line
}

方法2:

@import url('https://cdn.jsdelivr.net/npm/semantic-ui@2/dist/semantic.min.css'); 

方法3:

  @import url('https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css'); 

本文出自: 

CSS import breaks webpack 5 compilation · Issue #4287 · Semantic-Org/Semantic-UI-React · GitHubicon-default.png?t=M4ADhttps://github.com/Semantic-Org/Semantic-UI-React/issues/4287

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值