Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cesium definitely doesn't work with ES6 !!! #31

Open
Mr-Lion opened this issue Dec 22, 2021 · 0 comments
Open

Cesium definitely doesn't work with ES6 !!! #31

Mr-Lion opened this issue Dec 22, 2021 · 0 comments

Comments

@Mr-Lion
Copy link

Mr-Lion commented Dec 22, 2021

Hi,

Although it is advertised here and on the Cesium homepage that Cesium now supports ES6, this is not entirely true. ES6 was not implemented directly in order to only use "import" and "export" functions.

Have you ever tried to use "await" and "async"?
You will immediately notice that "await" is marked as an error, because the whole thing runs as "COMMONJS" and it is not supported by it.

I noticed that in which I wanted to use Promise in my Typescript and therefore cannot use "await" at all. As a result, asynchronous use is denied to me. I was told that in my tsconfig.json file I would have to change the module to, for example, "esNext" and the "target" to at least 2017. As soon as I do that, all of the Cesium code stops working. The script from me doesn't know either "Viewer" or "ION" as an example.

Since the "Promise" functionality is very important, I ask for urgent help and support in converting this to ES6 or higher.

Thank you in advance for the trouble.

Many greetings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant