boenfu / vuex-along

:memo: auto save and restore state for vuex
https://boenfu.github.io/vuex-along/
MIT License
259 stars 36 forks source link

vue-cli打包出错 #19

Closed qsjc closed 5 years ago

qsjc commented 5 years ago

版本1.2.3

2.x版本的vue-cli打包时并没有把插件的es6转为es5 导致在某些ios上直接报严格模式下const不支持 在将vuex-along 加入babel-loader的includes中后 在打包时直接报

WARNING in ./node_modules/vuex-along/lib/main.js
62:31-32 "export 'default' (imported as '_') was not found in 'lodash'

在直接放置服务器上后报

Cannot read property 'defaultsDeep' of undefined

感觉lodash并没有被引入进去 如何解决啊 急

boenfu commented 5 years ago

有加 babel-polyfill 吗,没有可以试试

qsjc commented 5 years ago

这是必加的,仍旧没用的

boenfu commented 5 years ago

唔 明天空了来模拟一下,我想可能你可以试下 把 lodash 加入 includes

qsjc commented 5 years ago

那我今天到公司试一下

qsjc commented 5 years ago

不行的哦

zyxlk commented 5 years ago

同样这个问题

boenfu commented 5 years ago

@zyxlk @wangjun521 现已加上了 babel ,可以更新到 1.2.4 试试。注意引入方式有一点点变化哟 import createVuexAlong from 'vuex-along'

boenfu commented 5 years ago

如果没啥问题我就先关闭issue咯,随时可以再打开,如果各位有更好的兼容方案,欢迎提pr