Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

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

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Level 4

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

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

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