-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
chore: remove bluebird, use the promise polyfill in babel/polyfill #1047
Conversation
…l/polyfill This is not a breaking change to existing apps. Existing apps with bluebird are not affected at all. This only affects new app. The promise polyfill provided by babel is very good, for example, it provides promise.prototype.finally on browsers have native promise but do not provide method finally. It guarantees to normalise browser.
hey @huochunpeng would the same babel polyfill be used for TS projects as well? |
It is for all ts and js projects. Previously we had babel polyfills in prepend of all cli bundler based setup (both ts and js). Now it’s more obvious because it is in code. |
this is great. I have a question that may not regard this specific PR, |
Aurelia-polyfills is part of Aurelia, because Rob had this view that Aurelia core should have no 3rd party dependencies. Which is good for Aurelia’s stability. Aurelia-polyfills only fills the parts that Aurelia needed. But it did not cover promise, probably because promise polyfill is not very small (correct me if I am wrong @EisenbergEffect). babel/polyfill is definitely bigger and more complete. When using babel with babel/polyfill, user can set option for Currently there is no way to remove aurelia-polyfills from your app, because it's imported internally by aurelia-bootstrapper. You can, however, remove babel/polyfill from your app, what you lose are:
|
I need IE support in my projects, and I find it hard to configure. in that same thought, can we have a step in the
|
Good idea. I am currently doing some refactoring work to simplify cli workflow/scaffolding. Then I will follow up with aurelia plugin scaffolding. I will investigate new options after those two tasks. |
This is not a breaking change to existing apps. Existing apps with bluebird are not affected at all. This only affects new app.
The promise polyfill provided by babel is very good, for example, it provides promise.prototype.finally on browsers have native promise but do not provide method finally. It guarantees to normalise browser.
Manually tested on all skeletons generated by
au generate-skeletons
. Cleanup some files, and fixed some minor problems with skeletons. All apps run, pass unit tests, pass e2e tests.Manually tested few more skeletons without navigation scaffold (
au generate-skeletons
uses navigation scaffold for all setups). All apps run, pass unit tests, pass e2e tests.This improve Aurelia performance on IE, as Bluebird is known being very slow on IE.