Skip to content

Commit

Permalink
Merge pull request #193 from goatandsheep/bugfix/gh-149
Browse files Browse the repository at this point in the history
  • Loading branch information
championswimmer authored Aug 5, 2020
2 parents b62e812 + 2e369f6 commit 07209bd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
4 changes: 2 additions & 2 deletions build/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export default {
output: 'dist/umd/index.js',
format: 'umd',
target: 'es5',
globals: {'lodash.merge': '_.merge'},
globals: {'lodash': '_'},
env: 'development'
},
umdMin: {
output: 'dist/umd/index.min.js',
format: 'umd',
target: 'es5',
globals: {'lodash.merge': '_.merge'},
globals: {'lodash': '_'},
plugins: {
post: [uglify()]
},
Expand Down
2 changes: 1 addition & 1 deletion build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import typescript from 'rollup-plugin-typescript2'
import configs from './configs'

const externals = [
'lodash.merge',
'lodash',
'vuex',
'flatted'
]
Expand Down
21 changes: 3 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"homepage": "https://github.com/championswimmer/vuex-persist#readme",
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/lodash.merge": "^4.6.4",
"@types/lodash": "^4.6.4",
"@types/mocha": "^5.2.5",
"chai": "^4.1.2",
"localforage": "^1.7.2",
Expand All @@ -74,7 +74,7 @@
},
"dependencies": {
"flatted": "^2.0.0",
"lodash.merge": "^4.6.2"
"lodash": "^4.17.19"
},
"peerDependencies": {
"vuex": ">=2.5"
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class VuexPersistence<S> implements PersistOptions<S> {
this.storage = options.storage || (typeof window !== 'undefined' ? window.localStorage : new MockStorage!())
} else {
// If UMD module, then we will only be having localStorage
this.storage = options.storage || window.localStorage
this.storage = options.storage || window.localStorage || MockStorage && new MockStorage()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lodashMerge from 'lodash.merge'
import {merge as lodashMerge} from 'lodash'

export function merge(into: any, from: any) {
return lodashMerge({}, into, from)
Expand Down

0 comments on commit 07209bd

Please sign in to comment.