ZachJW34 / nx-plus

Collection of Nx Community Plugins
MIT License
302 stars 50 forks source link

Docusaurus TypeScript support #127

Open Nightbr opened 3 years ago

Nightbr commented 3 years ago

Hello :wave:, Thanks for nx-plus plugins for nx! I use it for docusaurus & it works great :ok_hand:

Description

I would like to see an option to generate a Docusaurus App with TypeScript instead of only js.

Motivation

My Nx monorepo is composed of APIs in Nestjs in TypeScript, React Apps or Angular Apps in TypeScript, and all my libs & components are written in TS (or tsx). So it could be nice to also move Docusaurus to TypeScript (better interoperability and use of shared libs & components already written in TypeScript).

Suggested Implementation

It seems with Docusaurus 2 you can easily manage to use TypeScript out-of-the-box:

https://v2.docusaurus.io/docs/typescript-support

Could be a nice feature for Docusaurus v2 integration with Nx. I will try to look at the builder in the code to see if I could draft a PR easily.

Thank you for nx-plus plugins & for your help!

ZachJW34 commented 3 years ago

Glad it's working for you! As you said, many Nx projects use Typescript so Typescript support for Docsuaurus would be nice. If you are interested in contributing, check out our contributing documentation. Also, check out the conversation for #112. It's a workaround for typescript component support but it might be what you are looking for.

binary64 commented 3 years ago

This would be AWESOME! I beleive it would require an nx plugin for docusaurus, in order to inject into the webpack config to (presumably) load in ts-loader.