const {injectBabelPlugin} = require(‘react-app-rewired‘);module.exports = function override(config, env){ config = injectBabelPlugin([ ‘import‘, {libraryName: ‘antd‘, libraryDirectory: ‘es‘, style: ‘css‘} ], config); return config}
// 以React按需加载antd-design为例
// 这样即可在其他JS直接import { Button } from ‘antd‘