我是一个反应新手和打字稿的新手 . 我使用以下方法创建了一个简单的react typescript应用程序: create-react-app my-app --scripts-version=react-scripts-ts
. 现在我希望将typedoc集成到此文档中 . 但无法理解如何做到这一点 . 我安装了typedoc和typedoc-webpack-plugin尝试使用'react-app-rewired ' to override default webpack config but it doesn' t似乎正在工作 . 任何人都可以帮我弄清楚如何将typedoc与create-react-app集成 .
当我运行 npm start
时,我得到这样的错误:
第一个错误是关于autoprefixer,然后是browserlist,然后fsvents ..他们继续 .
这是我的config-overrides.js:
module.exports = {
webpack: function(config, env) {
const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
const typeDocPlugin = new TypedocWebpackPlugin({});
config.plugins.push(typeDocPlugin)
return config;
},
}