question

darren zou avatar image
darren zou asked

Cloud scripts: importing packages and using typescript?

Is there a way to import node packages to cloud script? Also switch to typescript? Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

As this thread -- Cloud Script: Can I use an external library? - Playfab Community described, we don’t provide the feature to import external libraries to Cloud Script. Cloud Script’s Typer Script SDK is only designed to allow you to write your Cloud Script with additional validation, it doesn’t support to import the external libraries too,

If you want to use the Node Js packages in your cloud code, you can consider using PlayFab CloudScript using Azure Functions. PlayFab CloudScript using Azure Functions is a feature that enables serverless compute on demand in the language of your choice. It provides the ability to write the Cloud Script in Node Js. You can also import external packages to your Azure Functions projects. For more details about how to use PlayFab CloudScript using Azure Functions, please check our documentation and the documents of Azure Function.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.