Skip to content

Commit 8ef5a9b

Browse files
committed
fix(module): always transpile nanoiid
#472
1 parent d201d3e commit 8ef5a9b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/guide/setup.md

-8
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,3 @@ auth: {
2828
::: warning IMPORTANT
2929
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).
3030
:::
31-
32-
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`:
33-
34-
```js
35-
build: {
36-
transpile: [/^nanoid/]
37-
},
38-
```

lib/module/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ module.exports = function (moduleOptions) {
3535

3636
// Copy plugin
3737
copyPlugin.call(this, { options, strategies, strategyScheme })
38+
39+
// Transpile nanoid (used for oauth2) for IE11 support (#472)
40+
this.options.build.transpile.push(/^nanoid/)
3841
}
3942

4043
function validateOptions (options) {

0 commit comments

Comments
 (0)