Library to migrate vuex state using vuex-persistedstate. See on npm
Run command bellow on your project folder
yarn add vuex-persistedstate-migrate
or
npm install vuex-persistedstate-migrate
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
import createMigrate from 'vuex-persistedstate-migrate'
const migrations = [
{
version: 1,
up: state => {
return {
...state,
myModule: {
...state.myModule,
myProperty: 'migrated value',
}
}
}
}
]
Vue.use(Vuex)
const store = new Vuex.Store({
plugins: [createPersistedState({
getState: createMigrate(migrations, 'migration.version'),
})],
modules
})
export default store
clean
- remove coverage data, Jest cache and transpiled files,build
- transpile TypeScript to ES6,build:watch
- interactive watch mode to automatically transpile source files,lint
- lint source files and tests,style:fix
- fix prettier style problems,style:check
- check for prettier style,test
- run tests,test:watch
- interactive watch mode to automatically re-run teststest:debug
- run tests debugging
Licensed under the MIT. See the LICENSE file for details.