You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
I agree with @antmdvs that it would make sense that this should work out of the box. If the template is broken for IE11, it raises the question of what else was overlooked.
import { Aurelia } from 'aurelia-framework';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap';
import * as Bluebird from 'bluebird';
Bluebird.config({ warnings: false });
declare const IS_DEV_BUILD: boolean; // The value is supplied by Webpack during the build
export function configure(aurelia: Aurelia) {
aurelia.use.standardConfiguration();
if (IS_DEV_BUILD) {
aurelia.use.developmentLogging();
}
aurelia.start().then(() => aurelia.setRoot('app/components/app/app'));
}
@Singularity222 No, sorry I still have not found a way to get this to work. I am using the Aurelia template and in a work environment where IE is the most prevalent browser. This makes me sad :-(
If anybody is interested. For the Aurelia template I had to patch the aurelia-bootstrapper-webpack.js with the following:
var Promise = require('bluebird');
Promise.config({
warnings: false,
longStackTraces: false
});
if (!window.Promise) {
window.Promise = Promise;
}
This is loaded before the app giving me the headache. Not sure this is the recommended way but can't link to a CDN in my environment and don't want to copy the node_modules to wwwroot.
@EisenbergEffect - Is this normal or have I done something stupid?
@niieani is probably the best person to comment. I should also note that we have some new webpack updates coming that will add full HMR :) And then server rendering is coming soon too :) Yay!
Have you actually tried this? If you have, then I must be doing something wrong.
I added that into the webpack.config.js which didn't work. I then added it to the webpack.config.vendor.js, still no joy and then tried adding it to both. At this point I just hacked the aurelia-bootstrapper-webpack.js as it seems to executes before anything else and doesn't take the plugin into account.
Activity
mttmccb commentedon Oct 28, 2016
Can't you just add it yourself if you need to support IE? Bluebird is a good one.
antmdvs commentedon Nov 1, 2016
That's a valid point, but the same could be said for #365, right? IMO, it seems incorrect that the
/fetchdataroute wouldn't work OOTB in IE11.arturcarvalho commentedon Nov 11, 2016
I agree with @antmdvs that it would make sense that this should work out of the box. If the template is broken for IE11, it raises the question of what else was overlooked.
beatsm commentedon Nov 29, 2016
I don't mind having to add a promise library but guidance to what to update with webpack would be good.
I have added in the webpack.config.vendor.js
And in my boot.ts:
But still get SCRIPT5009: 'Promise' is undefined
Thanks
wapplegate commentedon Dec 7, 2016
@beatsm Have you found a solution for this? I'm also looking to add the promise polyfill to the ReactRedux template. Any help would be appreciated.
wapplegate commentedon Dec 7, 2016
I was able to include babel-polfill to fix this issue in IE11. I included "babel-polyfill" in package.json. Here is the boot-client.tsx:
The polyfill added to webpack.config.vendor.js:
Not sure if this is the best way to go about it, however.
beatsm commentedon Dec 8, 2016
@Singularity222 No, sorry I still have not found a way to get this to work. I am using the Aurelia template and in a work environment where IE is the most prevalent browser. This makes me sad :-(
beatsm commentedon Dec 8, 2016
If anybody is interested. For the Aurelia template I had to patch the aurelia-bootstrapper-webpack.js with the following:
This is loaded before the app giving me the headache. Not sure this is the recommended way but can't link to a CDN in my environment and don't want to copy the node_modules to wwwroot.
@EisenbergEffect - Is this normal or have I done something stupid?
EisenbergEffect commentedon Dec 8, 2016
@niieani is probably the best person to comment. I should also note that we have some new webpack updates coming that will add full HMR :) And then server rendering is coming soon too :) Yay!
niieani commentedon Dec 9, 2016
@beatsm the best way to globally polyfill Promise is to add this plugin to your Webpack config:
This will replace all calls to
Promisewith the web equivalent ofrequire('bluebird').If you want to additionally expose a global
Promisewhich is a reference to Bluebird, you can also add a loader:You'll need to
npm install expose-loader.It's the equivalent of your:
beatsm commentedon Dec 12, 2016
@niieani Thanks for taking the time.
Have you actually tried this? If you have, then I must be doing something wrong.
I added that into the webpack.config.js which didn't work. I then added it to the webpack.config.vendor.js, still no joy and then tried adding it to both. At this point I just hacked the aurelia-bootstrapper-webpack.js as it seems to executes before anything else and doesn't take the plugin into account.
Regards
beatsm commentedon Dec 13, 2016
@niieani - Got it to work in the webpack.config.js using the plugin, I was just doing it wrong.
niieani commentedon Dec 17, 2016
Glad to hear @beatsm.
SteveSandersonMS commentedon Jan 16, 2017
Glad you got that aspect of it working. Thanks for letting us know!
As for the original matter of Promise polyfill, I'll close this in favour of #484 which describes it more generally.