安装 npm install **** 打包发布 npm run lib npm login npm publish 引用示例 import React, { Component } from 'react'; import { Button } from "****"; class App extends Component { render(){ return ( <div className="main"> <Button> Hi, Boy! </Button> </div> ); } } export default App;