iconfont-cli / taro-iconfont-cli

在Taro框架中使用iconfont图标,支持多端,支持多色彩,不依赖字体。
MIT License
355 stars 49 forks source link

taro3.2.0,支付宝和百度都不支持 #54

Open crixusshen opened 3 years ago

crixusshen commented 3 years ago

感觉每次依赖平台的依赖性太大了,还是用最原始的样式引入字体的方式来实现吧

lesterlong007 commented 2 years ago

一言难尽 taro 3.4,支付宝小程序直接报错 Can't resolve 'components/iconfont/alipay/alipay'

ywanhzy commented 1 year ago

一言难尽 taro 3.4,支付宝小程序直接报错 Can't resolve 'components/iconfont/alipay/alipay'

我的也是同样错误

DawnCHL commented 1 year ago

支付宝小程序的场景,将helper.js 修改一下可以使用:

/* eslint-disable */
const useGlobalIconFont = () => {
  return {
    iconfont: `./components/iconfont/${process.env.TARO_ENV}/${process.env.TARO_ENV}`,
  };
};

// es modules is unavaiable.
module.exports.useGlobalIconFont = useGlobalIconFont;

我的 taro 版本是 v3.4.x。