Please specify what version of the library you are using: [v2beta]
Please specify what version(s) of SharePoint you are targeting: [2016, online]
Expected: PnPjs loads in a SP2016 page without error message, in IE11.
I am getting the following error message:
Object doesn't support property or method 'defineProperty'
The error points to the following code:
Reflect.defineProperty(SPRest.prototype, "site", {
configurable: true,
enumerable: true,
get: function get() {
return Site(this._baseUrl).configure(this._options);
}
});
Source code:
For IE11:
import "@pnp/polyfill-ie11";
import { sp } from "@pnp/sp";
import "@pnp/sp/lists/web";
import "@pnp/sp/items/list";
import { Web } from "@pnp/sp/webs";
Thank you!
IE support was dropped for v2. Stick with V1 if you need to support IE11.
With IE going the way of the Dodo in the near future I agree that it makes sense to fork an IE compatible version. If there's anything that's needed for IE I'm sure the community can band together to implement that rather than expecting pnpjs to maintain IE support for 2.0 and beyond.
Fair enough, but if this is the position of the project team the documentation should reflect it.
Currently it states that "our policy moving forward will be doing our best not to break anything in ie11 mode." and "if you find an ie11 bug we expect you to work with us on helping to fix it".
Patrick Rodgers advised me to report my IE11 issue here.
Definitely makes sense to make it clear in the 2.0 documentation once it releases. I'm not a member of the PnP team just thought I'd answer something I know. Dropping IE was something the community was asked about rather than a directive pushed out by the team.
I'm assuming Patrick thought the issue was with 1.0. It's what should be used in production builds right now regardless.
Everyone is right - def want this reported as our goal is not to break folks IF we can help it. I think here we can help it so good to know and do something where we can. But also true that in cases where something we are doing simply won't work in IE (for ex the way we have implemented extensions) we will disable that feature in v2 for IE mode.
Hi - can you please try a new beta version of the polyfill package I just published? Should work the same as before, just include it in your project - but updated to include Reflect polyfills.
npm install @pnp/polyfill-ie11@beta --save
Thanks Patrick! That fixed the issue in IE11 mode.
(please ignore the previous messages, I had a couple hiccups along the way).
Awesome! So we will have a 2.0 polyfill for v2 of the main library moving forward.
Most helpful comment
Awesome! So we will have a 2.0 polyfill for v2 of the main library moving forward.