-
Notifications
You must be signed in to change notification settings - Fork 576
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
from UglifyJs Unexpected token: name (Mime) [./~/ali-oss/shims/mime.js:8,0] #396
Comments
如果使用的是webpack 请 参考下 example中的webpack.prod.js, 需要对es6/7的语法进行babel转换成es5 |
遇到了差不多的问题 想要前端直传oss,加了ali-oss这个库就会报这个 .babelrc是这样的
上面的答案无效 把.babelrc改成
也不行 |
用 require('ali-oss/dist/aliyun-oss-sdk.js') 搞定了 |
这种方式不会错 require('ali-oss/dist/aliyun-oss-sdk.js') 或者直接引用链接 |
我们计划后边把这个mime.js 进行改造, 彻底解决这个问题, 目前大家可以如果配置webpack的babel不行的话,就通过 require('ali-oss/dist/aliyun-oss-sdk.js')这种方式 构建, 等后边这个mime.js文件改造后就用原来方式就可以了 |
我按照上面的建议做了还是报错:
我是在antd-pro 项目里使用的 @binghaiwang |
@binghaiwang 改造好了吗?
这个配置应该也是转为es2015的? |
升级 5.3.1解决 |
from UglifyJs
Unexpected token: name (Mime) [./~/ali-oss/shims/mime.js:8,0]
The text was updated successfully, but these errors were encountered: