You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
根据官网提供的迁移方案1迁移,v2能正常使用,v5存在样式丢失,需要配置什么v才能正常使用
1.config-overrides.js配置如下:
const { override, fixBabelImports, addPostcssPlugins } = require('customize-cra');
module.exports = override(
fixBabelImports('import', {
libraryName: 'antd-mobile',
libraryDirectory: "es/components",
style: false
}),
addPostcssPlugins([require('postcss-pxtorem')({
rootValue: 16,
propList: ['']
// propList: ['', '!border*', '!font-size*', '!letter-spacing'],
// propWhiteList: []
}),])
);
2.页面使用代码:
import {NavBar,SearchBar, Toast,Button } from 'antd-mobile';
3.问题截图:
Beta Was this translation helpful? Give feedback.
All reactions