Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release brokes IE 11 #329

Closed
shlima opened this issue Jun 21, 2019 · 7 comments
Closed

Release brokes IE 11 #329

shlima opened this issue Jun 21, 2019 · 7 comments

Comments

@shlima
Copy link

shlima commented Jun 21, 2019

Version

v5.2.1

Reproduction link

http://ie11.com

Steps to reproduce

nuxt-i18n v5.12.5 adds the is-https dependency, which code is not transpiled properly.

IE 11 fails in the following line here: (default function arg xForwardedProto = true)

function isHTTPS(req, xForwardedProto = true) {
...
}

With the following error:

SCRIPT1006: Expected ')'

What is expected ?

Works

What is actually happening?

Not working

This bug report is available on Nuxt community (#c250)
@ghost ghost added the cmty:bug-report label Jun 21, 2019
@paulgv
Copy link
Collaborator

paulgv commented Jun 22, 2019

@rchl WDYT? Could you have a look?

@rchl
Copy link
Collaborator

rchl commented Jun 22, 2019

It does indeed look like default arguments are not transpiled in nuxt. Compiled bundle has this code:

t.exports = function(t, e = !0) {

@pi0 Do you have any take on this? Is Nuxt supposed to support IE11?

@rchl
Copy link
Collaborator

rchl commented Jun 22, 2019

BTW. Given that it's not even needed on the client, we could work around that by conditionally requiring it but then I would need to mix require and es6 imports which I'm not sure is a good idea...

@shlima
Copy link
Author

shlima commented Jun 22, 2019

@pi0 Do you have any take on this? Is Nuxt supposed to support IE11?

Nuxt, vue and nuxt-i18n worked perfect in IE 11 before

@rchl
Copy link
Collaborator

rchl commented Jun 22, 2019

Then I wonder why is Nuxt not transpiling that construct...

@rchl
Copy link
Collaborator

rchl commented Jun 22, 2019

I will require it conditionally for now which will fix that problem (and as a bonus, make client bundle tiny bit smaller). I would be vary of mixing require and es imports but since middleware.js already does that for ./utils, I guess it should work (for now at least).

@paulgv
Copy link
Collaborator

paulgv commented Jun 22, 2019

Sounds good, thanks @rchl

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

No branches or pull requests

3 participants