mkdir mylibrary
cd mylibrary
npm init -y
npx -p @storybook/cli sb init --type react
npm i -D fork-ts-checker-webpack-plugin..."@storybook/addon-links"
],typescript:{
check:false,
checkOptions:{},
reactDocgen:'react-docgen-typescript.../node_modules/.test(prop.parent.fileName):true),
},
},
};
在根目录创建 tsconfig.json文件 ,内容如下
{...target":"es5",
"lib":["es6","dom","es2016","es2017"],
"sourceMap":true,
"jsx":"react