nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

auth-next is not transpiled #1084

Open ms-fadaei opened 3 years ago

ms-fadaei commented 3 years ago

Version

module: 5.0.0-1613647907.37b1156 nuxt: 2.15.3

Nuxt configuration

mode:

Nuxt configuration

  auth: {
    strategies: {
      local: {
        token: {
          property: "token",
        },
        user: {
          property: false,
        },
        endpoints: {
          login: false,
          user: {url: "/api/me/", method: "get", baseURL: config.legacyApiUrl},
          logout: false,
        },
      },
    },
    cookie: {
      prefix: "__Host-auth.",
      options: {
        path: "/",
        secure: true,
        sameSite: "Lax",
      },
    },
    resetOnError: true,
  }

Reproduction

What is expected?

non ES2015 browsers

What is actually happening?

I have an error in the IE11 console (errors about ES2015 features)

Steps to reproduce

just add the module and browse to the production URL in IE11

Additional information

Checklist

How to solve that?

Just add this to my Nuxt config:

build: {
    transpile: ["auth-next"],
}
yinfoyuan commented 3 years ago

I have a related error here

image

build: {
  transpile: ['auth-next', 'requrl'],
}
ms-fadaei commented 3 years ago

@yinfoyuan yes, I approve that the requrl is needed to be transpiled too.

acmelaw commented 3 years ago

In case anyone's encountering similar issues, I had trouble withthis.$auth.loginWith on IE11 as well, adding the following packages fixed it for me:

import "fastestsmallesttextencoderdecoder";
import "webcrypto-shim";