Skip to content

Commit dbcbb11

Browse files
authored
docs: update the new logger plugin export path (#1784)
1 parent 04e2bd8 commit dbcbb11

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Diff for: docs/guide/plugins.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,17 @@ The plugin will be used by default. For production, you will need [DefinePlugin]
9292
Vuex comes with a logger plugin for common debugging usage:
9393

9494
``` js
95-
import createLogger from 'vuex/dist/logger'
95+
import { createLogger } from 'vuex'
9696

9797
const store = new Vuex.Store({
9898
plugins: [createLogger()]
9999
})
100100
```
101101

102+
:::warning WARNING
103+
Before v3.5.0, the `createLogger` function is exported at `vuex/dist/logger` package. PLease checkout the "Before Vuex v3.5.0" setion of this page.
104+
:::
105+
102106
The `createLogger` function takes a few options:
103107

104108
``` js
@@ -137,3 +141,15 @@ const logger = createLogger({
137141
The logger file can also be included directly via a `<script>` tag, and will expose the `createVuexLogger` function globally.
138142

139143
Note the logger plugin takes state snapshots, so use it only during development.
144+
145+
#### Before Vuex v3.5.0
146+
147+
Before v3.5.0, the `createLogger` function is exported at `vuex/dist/logger` package.
148+
149+
``` js
150+
import createLogger from 'vuex/dist/logger'
151+
152+
const store = new Vuex.Store({
153+
plugins: [createLogger()]
154+
})
155+
```

0 commit comments

Comments
 (0)