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) {