File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,17 @@ The plugin will be used by default. For production, you will need [DefinePlugin]
92
92
Vuex comes with a logger plugin for common debugging usage:
93
93
94
94
``` js
95
- import createLogger from ' vuex/dist/logger '
95
+ import { createLogger } from ' vuex'
96
96
97
97
const store = new Vuex.Store ({
98
98
plugins: [createLogger ()]
99
99
})
100
100
```
101
101
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
+
102
106
The ` createLogger ` function takes a few options:
103
107
104
108
``` js
@@ -137,3 +141,15 @@ const logger = createLogger({
137
141
The logger file can also be included directly via a ` <script> ` tag, and will expose the ` createVuexLogger ` function globally.
138
142
139
143
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
+ ```
You can’t perform that action at this time.
0 commit comments