활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi all,
We have a application which uses typescript and are facing issues to embed the launch script. Need help on how we could do this.
Thanks.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Hello @jane_12
What issues you're facing .. could you please provide more details like error or screenshot?
Meantime, please see below documentation and see if you have embed the code in right way
조회 수
답글
좋아요 수
Hello @jane_12
What issues you're facing .. could you please provide more details like error or screenshot?
Meantime, please see below documentation and see if you have embed the code in right way
조회 수
답글
좋아요 수
Hi @Gokul_Agiwal ,
Don't have the screenshots but the application uses TypeScript instead of JavaScript for client-side programming. So the launch embed script which is JavaScript, isn't working.
조회 수
답글
좋아요 수
so In this case, you have to include as external JS library ( Launch library) and import it into your typescript application.
조회 수
답글
좋아요 수
Technically, there should be no issues running Typescript and Javascript together on the same site.. Typescript is a superset of Javascript, unless of course you are using a compiler which is converting all .js files to use the .ts file extension (and it's changing the Adobe Files as well). Since the Adobe scripts aren't hosted on your server, that could affect targeting... but surely you have ads or other third party scripts loading on your site that are using JS...
Can you provide more information about the issue you are getting? I don't work with Typescript sites, so I don't have an "actual" example to work with and can only guess at the issue you are encountering....
조회 수
답글
좋아요 수
@Gokul_Agiwal and @Jennifer_Dungan ,
The application uses SharePoint Framework (SPFx) used for development of SharePoint Online applications.
조회 수
답글
좋아요 수
Oh dear... it's SharePoint too?
Is the code live? Would you be willing to share the URL (even if through a private message) so we can see what is happening in the network panel and console logs?
조회 수
답글
좋아요 수
Though it's SharePoint but TS / JS works like on any other platforms except if you're facing some SharePoint related issues then it's different.
I think you need to import your JS ( _satellite / launchJS) as module
import * as _Satellite from './../folder/_Satellite';
and in the typescript declaration file ( tsconfig.json) and make sure you enable the below compiler options
{
"compilerOptions": {
"allowJs": true
"checkJs": false
}
}
Reference -
https://www.typescriptlang.org/tsconfig#allowJs
https://www.typescriptlang.org/tsconfig#checkJs
See if this method works. Let us know.
조회 수
답글
좋아요 수
Thanks for sharing this, will try this approach and let you know.
조회 수
답글
좋아요 수
it's a JS error.
조회 수
답글
좋아요 수
What's the error ? Is it possible to put logs / screenshot here
조회 수
답글
좋아요 수
@jane_12 Is your issues resolved?
If yes, could you please post the solution here so it will be helpful for others.
조회 수
답글
좋아요 수