Skip to content

Commit

Permalink
fix(module): always transpile nanoiid
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 27, 2019
1 parent d201d3e commit 8ef5a9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 0 additions & 8 deletions docs/guide/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/]
},
```
3 changes: 3 additions & 0 deletions lib/module/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8ef5a9b

Please sign in to comment.