Hi,
i tried using TypeScript directly in clientlibs like explained in here:
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/develo...
I tried following steps explained in documentation and its not working for me.
I created cq:ClientLibraryFolder, modified jsProcessor as shown in their example (Typescript to Preprocess and Then GCC to Minify and Obfuscate), but when code is compiled to js its throwing "Uncaught SyntaxError: Unexpected identifier" for any typescript syntax.
Does anyone have experience or examples using TS directly in clientlibs without using any additional, external compilers?
I found this post where it says that gcc is not working on 6.4, are there any updates on 6.5 or cloud version?
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @edisincek ,
The support issue which this post is referring to is for ES6. Unfortunately, TS would need to be compiled into JS before it can be read/executed by a browser.
You would need an external compiler for this scenario.
I would suggest you move this TS to the ui.frontend modeule as TS is supported there and you can then build it through webpack and move the minified & compiled JS to CRX.
https://aemcorner.com/ui-frontend-and-typescript/
Hi @edisincek ,
The support issue which this post is referring to is for ES6. Unfortunately, TS would need to be compiled into JS before it can be read/executed by a browser.
You would need an external compiler for this scenario.
I would suggest you move this TS to the ui.frontend modeule as TS is supported there and you can then build it through webpack and move the minified & compiled JS to CRX.
https://aemcorner.com/ui-frontend-and-typescript/
Views
Likes
Replies