From 8ef5a9bf6cff886be2dfc49855cf5c7c4cb1c670 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 27 Dec 2019 13:23:58 +0100 Subject: [PATCH] fix(module): always transpile nanoiid #472 --- docs/guide/setup.md | 8 -------- lib/module/index.js | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/guide/setup.md b/docs/guide/setup.md index 626f04c28..552f72974 100644 --- a/docs/guide/setup.md +++ b/docs/guide/setup.md @@ -28,11 +28,3 @@ auth: { ::: warning IMPORTANT When adding `auth-module` to a new Nuxt project ensure you have activated the Vuex store. More information on how to do that can be found on the [Nuxt Getting Started Guide](https://nuxtjs.org/guide/vuex-store). ::: - -Finally, if you need IE11 support, you will need to transpile `nanoid`, a dependency of `@nuxtjs/auth`. Add the following to your `nuxt.config.js`: - -```js - build: { - transpile: [/^nanoid/] - }, -``` diff --git a/lib/module/index.js b/lib/module/index.js index dd6ed8086..c007e470d 100644 --- a/lib/module/index.js +++ b/lib/module/index.js @@ -35,6 +35,9 @@ module.exports = function (moduleOptions) { // Copy plugin copyPlugin.call(this, { options, strategies, strategyScheme }) + + // Transpile nanoid (used for oauth2) for IE11 support (#472) + this.options.build.transpile.push(/^nanoid/) } function validateOptions (options) {