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

[Build] Remove tslib reference in es6 packages (First step towards esm) #12784

Closed
RaananW opened this issue Jul 22, 2022 · 0 comments · Fixed by #12897
Closed

[Build] Remove tslib reference in es6 packages (First step towards esm) #12784

RaananW opened this issue Jul 22, 2022 · 0 comments · Fixed by #12897

Comments

@RaananW
Copy link
Member

RaananW commented Jul 22, 2022

This is partly related to esm, but can be done externally and unrelated to the esm work.

In our es6 packages we still require tslib. tslib is used as a polyfill for missing functionality for the target. The issue is that we are using decorators, which is not available in any javascript version. It is currently in a stage-2 proposal (https://github.com/tc39/proposals#stage-2), after not even being requested for a long time. It also requires typescript to use the experimentalDeocators flag to have the feature enabled.

If we remove the use for decorators (or polyfill them ourselves similar to the way typescript does it), we can eliminate the need for a tslib reference which in turn will allow @babylonjs/core to be used directly in browser.

@RaananW RaananW self-assigned this Jul 22, 2022
RaananW added a commit that referenced this issue Aug 26, 2022
…m) (#12897)

* [Build] Remove tslib reference in es6 packages (First step towards esm)
Fixes #12784

* formatting

* fix for constants

* Update packages/dev/core/src/Engines/thinEngine.ts
RaananW added a commit that referenced this issue Dec 9, 2022
…m) (#12897)

* [Build] Remove tslib reference in es6 packages (First step towards esm)
Fixes #12784

* formatting

* fix for constants

* Update packages/dev/core/src/Engines/thinEngine.ts

Former-commit-id: b051ff4521424c8c7306fd509a60ff26c3b3075f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant