Open crixusshen opened 3 years ago
一言难尽 taro 3.4,支付宝小程序直接报错 Can't resolve 'components/iconfont/alipay/alipay'
一言难尽 taro 3.4,支付宝小程序直接报错 Can't resolve 'components/iconfont/alipay/alipay'
我的也是同样错误
支付宝小程序的场景,将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。
感觉每次依赖平台的依赖性太大了,还是用最原始的样式引入字体的方式来实现吧