Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

IE 11 syntax error #67

Open
northosts opened this issue Oct 3, 2019 · 8 comments · May be fixed by #68
Open

IE 11 syntax error #67

northosts opened this issue Oct 3, 2019 · 8 comments · May be fixed by #68

Comments

@northosts
Copy link

We have an issue when we are using wp-nuxt out of the box on ie11, we get a syntax error in the superagent library (yarn run dev -> vendor.app.js):

.forEach(fn => {

Problem is that arrow-functions (and other ES6) do not work in ie11, so we added all libraries to transpile in the build option. That solves the first error and a couple of others that are following and are ES6 related. Unfortunately, now we are stuck with the following error, which we can't find any fix for (vendor.app.js): "Unable to get property 'replace' of undefined or null reference".

namedGroupedPattern.replace(

Is there a fix for that?

@yashha
Copy link
Owner

yashha commented Oct 3, 2019

Interesting, I can't get it working too, I have to investigate it more.
Also I can't reproduce your new error at the moment. Which libaries did you add in the transpile option.

Seems to be an issue with wpapi.
Does wuxt work in ie11 at the moment?

@yashha
Copy link
Owner

yashha commented Oct 3, 2019

Maybe related to this:
WP-API/node-wpapi#438

@yashha
Copy link
Owner

yashha commented Oct 3, 2019

Same errors here at @pfunto 's project using next
https://github.com/prismdreamfactory/kaiyros-frontend

@northosts
Copy link
Author

Yes, seems like the same errors we are experiencing. No wuxt doesn't work with ie11, which was the reason to open this issue :) Will test the workaround in the issue you referenced. We had problems to load the client bundle only in the client, but I'll give it another try.

@yashha yashha linked a pull request Oct 3, 2019 that will close this issue
@yashha
Copy link
Owner

yashha commented Oct 3, 2019

Checkout the pr, I had also problems with the client build and did now a fork.
The browser build of the alpha release is weird. It is different then what I released with the fork.
https://cdn.jsdelivr.net/npm/wpapi@2.0.0-alpha.1/browser/wpapi.js
https://cdn.jsdelivr.net/npm/wpapi-fork@2.0.0-alpha.1/browser/wpapi.js

@defaye
Copy link

defaye commented Jan 6, 2021

Was there any advances on this issue? Any new insights on where things are at?

@yashha
Copy link
Owner

yashha commented Jan 13, 2021

When you have an Idea how to solve it or want to contribute, you can open a pull request.
I have no time to solve this at the moment also because ie11 is kind of outdated it is not my prio at the moment sorry.

Here was an attempt to get it working, but I think it has to be adapted and it is not a good solution. #68

@Triloworld
Copy link
Contributor

From https://docs.microsoft.com/en-us/lifecycle/products/internet-explorer-11
After June 15, 2022 it is obsolete and will have more problems that only this library.
Pleas upgrade browser or fork it and rebuild if required. I don't see any advantage in supporting it. Maybe polyfill ES6 in IE11?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants