wp-nuxt icon indicating copy to clipboard operation
wp-nuxt copied to clipboard

IE 11 syntax error

Open northosts opened this issue 5 years ago • 8 comments

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?

northosts avatar Oct 03 '19 09:10 northosts

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 avatar Oct 03 '19 13:10 yashha

Maybe related to this: https://github.com/WP-API/node-wpapi/issues/438

yashha avatar Oct 03 '19 13:10 yashha

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

yashha avatar Oct 03 '19 15:10 yashha

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.

northosts avatar Oct 03 '19 19:10 northosts

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/[email protected]/browser/wpapi.js https://cdn.jsdelivr.net/npm/[email protected]/browser/wpapi.js

yashha avatar Oct 03 '19 22:10 yashha

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

defaye avatar Jan 06 '21 14:01 defaye

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. https://github.com/yashha/wp-nuxt/pull/68

yashha avatar Jan 13 '21 15:01 yashha

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?

Triloworld avatar Mar 22 '22 18:03 Triloworld