移动端组件库
yarn add @fexd/mobile
# 或者
npm install @fexd/mobile --save
配合 babel-plugin-import 实现按需加载
// babel.config.js
module.exports = {
plugins: [
[
'babel-plugin-import',
{
libraryName: '@fexd/mobile',
libraryDirectory: 'lib/exports', // or 'es/exports'
camel2DashComponentName: false,
style: (name) => `${name}/style.less`, // or `${name}/style.css`
},
'@fexd/mobile',
],
],
}