You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would be the best way to have documentationjs support optionalChaining again? It looks like it was removed in #1371. I recently upgraded documentation from 13.1.0 to 13.2.5 and some of my code no longer builds because I was using this syntax. Any thoughts? Thank you! 🙇
The text was updated successfully, but these errors were encountered:
What would be the best way to have documentationjs support optionalChaining again? It looks like it was removed in #1371. I recently upgraded documentation from 13.1.0 to 13.2.5 and some of my code no longer builds because I was using this syntax. Any thoughts? Thank you! 🙇
Use a Custom Babel Configuration
Since documentation.js relies on Babel for parsing, you can provide your own Babel configuration that includes the necessary plugins for supporting optional chaining.
To do this, create a .babelrc file or update your existing Babel configuration to include the necessary plugin: { "presets": ["@babel/preset-env"], "plugins": ["@babel/plugin-proposal-optional-chaining"] }
Run documentation build --babel .babelrc -f html -o docs
What would be the best way to have documentationjs support
optionalChaining
again? It looks like it was removed in #1371. I recently upgraded documentation from 13.1.0 to 13.2.5 and some of my code no longer builds because I was using this syntax. Any thoughts? Thank you! 🙇The text was updated successfully, but these errors were encountered: