webpack的按需引入配置
ant.design插件需要less配合,yarn add babel-plugin-import,webpack4.0的babel文件已经配置到webpackconfig.js中,需要eject暴露出来修改这里,less要配置到2.7.3,
yarn add less@^2.7.3
修改配置:
['import', { libraryName: 'antd', style: true }]
ant.design插件需要less配合,yarn add babel-plugin-import,webpack4.0的babel文件已经配置到webpackconfig.js中,需要eject暴露出来修改这里,less要配置到2.7.3,
yarn add less@^2.7.3
修改配置: