Skip to content
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

关于Uglifyjs,在build时对于一些组件es6语法无法正确转译的情况 #4

Open
uniquedestiny opened this issue Nov 27, 2017 · 1 comment

Comments

@uniquedestiny
Copy link

No description provided.

@uniquedestiny
Copy link
Author

问题描述:
1511502991 1

问题导致:低版本手机浏览器空白页面(问题突发性不高,主要集中在偶尔引用组件所下载的版本问题)

问题解决方案:
webpack.base.conf.js
1.
rules 下面加上这个 {
test: /.js$/, // Check for all js files
exclude: /node_modules/(?!(dom7|swiper)/).*/,
loader: 'babel-loader'
},
2.第一种方案可能会导致忽略的包过大打包失败,所以第二种方案定位得更具体一些
例子: {
test: /.js$/,
loader: 'babel-loader',
include: [
resolve('src'), resolve('test'),
resolve('错误路径')......................................
]
},

@uniquedestiny uniquedestiny changed the title 关于Ug 关于Uglifyjs,在build、 Nov 27, 2017
@uniquedestiny uniquedestiny changed the title 关于Uglifyjs,在build、 关于Uglifyjs,在build时对于一些组件es6语法无法正确转译的情况 Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant