How to include typescript in AEM SPA React project within the mvn project creation command ? | Community
Skip to main content
akashkriz005
Level 2
January 4, 2024
Solved

How to include typescript in AEM SPA React project within the mvn project creation command ?

  • January 4, 2024
  • 1 reply
  • 1251 views

Hi Team , 

I'm trying to build an AEM SPA React project from the scratch and UI team suggested to add typescript in the code base.
Any possible way to add typescript dependency in the  mvn command for project creation ? 

Regards,
Akash Krishna

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JagarlamudiVe

Hello @akashkriz005 

 

As of now, there is no direct way to add TypeScript dependencies using the Maven command for an AEM SPA React project creation. The Adobe archetype does not support TypeScript out of the box. however you can manually add ts to your project once after generating the project.

navigate to ui.fe folder Then -- npm install --save-dev typescript , npx tsc --init

then update your Webpack configs to typescript as extensions: [ '.tsx', '.ts', '.js' ].

Hope this Helps you.

 

Thanks,

Venkat

 

1 reply

JagarlamudiVeAccepted solution
Level 4
January 4, 2024

Hello @akashkriz005 

 

As of now, there is no direct way to add TypeScript dependencies using the Maven command for an AEM SPA React project creation. The Adobe archetype does not support TypeScript out of the box. however you can manually add ts to your project once after generating the project.

navigate to ui.fe folder Then -- npm install --save-dev typescript , npx tsc --init

then update your Webpack configs to typescript as extensions: [ '.tsx', '.ts', '.js' ].

Hope this Helps you.

 

Thanks,

Venkat

 

akashkriz005
Level 2
January 9, 2024

Thanks for the info Venkat ! Cheers !!