problems with babel-polyfill
See original GitHub issue-
Library Version: 0.27.0
-
Operating System: Windows 7 Professional
-
Node Version: 7.7.2
-
NPM Version: 4.4.4
This is more or less a question, i had no response on gitter or stackoverflow.
I have an cli generated project where i added kotojs
using npm and then imported it using au import
.
Kotojs itself depends on babel-polyfill
so i added it using npm and au import
.
The relevant part of my aurelia.json file looks like this:
{
"name": "babel-polyfill",
"main": "dist/polyfill.js",
"path": "../node_modules/babel-polyfill",
"resources": []
},
{
"name": "koto",
"main": "dist/koto.js",
"path": "../node_modules/koto",
"deps": [
"babel-polyfill"
],
"resources": []
}
As soon i have added babel polyfill
like this, the main.js
is not working as intended.
The problem in the main.js
is this:
Promise.config({
warnings: {
wForgottenReturn: false
}
});
I get the following error:
TypeError: Promise.config is not a function
Could there be any conflict between bluebird-promise and babel-polyfill-promise since the babel-polyfill also includes a promise implementation (corejs)?
I really don’t understand what is going on and whether i did something wrong or whether there is an issue with the cli generated project.
I found out that Promise.config is not standard. Maybe its a better idea to use standardized versions of promises or wrap away such non standard deviations.
Any help is very appreciated since i use Aurelia for a production project at work.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Hey @arnonuem
I gave this a shot, and used your config initially. When building it tried to find
d3
which wasn’t configured, so I installed it withau install d3
. This resulted in the following configuration:It took a lot of code to get a chart rendered. Here we go:
And when running the app I got a chart:
Pushed the app here so you can compare setups.
I used aurelia-cli 0.28.0
Yeah that’s a weird one. Glad you got it working