-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpvue-router-patch 引用的 query-string ios10版本兼容问题 #7
Comments
可以打开开发工具的 es6 转换试下,另外 mpvue-router-patch 这个库我晚点提供一个 es5 的版本 |
开发工具转es6会报错,因为我其他的包已经转过了,能提供es5版本的最好了 |
这个库好说,组件库不知道有没有类似的问题 |
就是 |
可以换成 |
感谢 |
好了应该,我这边简单测了下没问题 |
嗯嗯,成功解决兼容问题,👍。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
因为使用了
mpvue-router-patch
包,但是并没有经过babel
处理,导致打包后的vendor.js
包含const
,经测试,在ios
10版本及以下会出现如图错误。我的解决办法是使用
babel-loader
处理,但是mpvue-router-patch
引用的query-string
这个包也是使用了const
,没有经过babel
处理。我将query-string
也同样处理后,但是query-string
并不是使用es6
写法,不知道怎么处理了。import queryString from 'query-string';
const queryStr = queryString.stringify(query, { encode: false })
改为
import queryString from 'querystring';
const queryStr = queryString.stringify(query)
我将
query-string
替换为querystring
解决了兼容问题。请问怎样配置能解决这个问题的。The text was updated successfully, but these errors were encountered: