-
Notifications
You must be signed in to change notification settings - Fork 485
support babel-plugin-module-resolver #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'd welcome a PR in this direction, though my direction with the project is essentially going in the opposite direction. I think it's ideal to cater to mainstream code first and to avoid any plugins or transformations that wouldn't run natively in some runtime, like Node.js or a browser - Babel transforms that aren't ever going to be part of the standard language seem like a step too far in the direction of perl. |
think I got a temporary workaround at the moment by doing |
Does documentationjs support any babel plugins? Like dynamic imports? I'm running into issues with code that happens to have
Documentation throws the error Unexpected token. |
See #1149 - dynamic import support is temporarily dropped until there's a Babel 7 solution to it. |
Here's a list of projects that use Partly thanks to Babel, there really is no such thing as "mainstream JS". To some degree, we're all rolling our own versions of JS (or letting projects like Create React App do it for us). Do we support JSX? The latest version of ECMAScript? What about stage 3 proposals? TypeScript? The list goes on. (Even in untranspiled code in browsers there isn't 100% parity between them). By supporting the local Babel config, we can support the mainstream. |
I appreciate the line of thinking, but per the statement, the best way to argue for a feature is to submit a PR. |
Custom babel configurations are now supported in 10.x like:
|
@tmcw this doesn't work with |
related to #140
If use
babel-plugin-module-resolver
or Webpack to simplify path resolution,documentation.js
would fail to resolve the imported modules from the entry point.babel.config.js
:src/index.js
:Currently, I configured
modulePaths
in jest andeslint-import-resolver-node
so that the path resolver config works across development, test, lint.It would be nice to be able to add a plugin for path resolution or offer settings in
.documentationrc.yml
to have the same feature in docgen.The text was updated successfully, but these errors were encountered: