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]
9292Vuex 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
9797const 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+
102106The ` createLogger ` function takes a few options:
103107
104108``` js
@@ -137,3 +141,15 @@ const logger = createLogger({
137141The logger file can also be included directly via a ` <script> ` tag, and will expose the ` createVuexLogger ` function globally.
138142
139143Note 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