Closed strothj closed 6 years ago
jason, you are amazing. my skill level is not yet there to be able to help out but i hope to learn a lot from the code you are doing here. thank you.
@strothj this is good news! Thank you for your help.
Hello,
I have a build available for a loader version of this project. You can view the details here: https://github.com/strothj/react-docgen-typescript-webpack-plugin/tree/feature/add-loader
If you would like to try this, make sure to remove the plugin version. I'm currently investing why the initial load time is so long but once its going it seems to work nicely.
I'm curious to know if this resolves all the problems from before.
@strothj Thank you very much! New loader works perfectly! You've done an amazing work.
@strothj didn't you try to customize the PropTypes table? The @types are outdated: there isn't TableComponent
property in Options interface there, so it's incompatible with the Addon v3.
update: This can be fixed easily in @types index.d.ts
. Sorry for troubling you.
Released
I've started work on a Webpack loader which is able to tap into the original source code and amends it with code generated using the abstract syntax tree functions from the TypeScript compiler.
Looking good so far. This will probably resolve both the issues with multiline text strings and the different module types.
It should be usable as a
Webpack pluginor loader(Webpack plugin will simply inject the loader).Goals for this loader:
Resolve issue with line wrappings when importing third party components under certain conditions
Enable support for module target
esnext
[x] Implement loader and AST generation of docgen information
[x] Package loader, add additional test fixtures
First version of the loader is available here (remove plugin version first): https://github.com/strothj/react-docgen-typescript-webpack-plugin/tree/feature/add-loader