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

依赖中有ismobilejs包,但是实际未使用导致webpack将其打包进来,却未进行es6语法编译 #1895

Closed
1 task
IceApriler opened this issue Mar 18, 2020 · 5 comments
Labels

Comments

@IceApriler
Copy link

IceApriler commented Mar 18, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.0-rc.4

Environment

ant-design-vue@1.4.12

Reproduction link


Steps to reproduce

使用vue-cli 引入ant-design-vue@1.4.12,npm run build后在dist中搜索ismobilejs。

What is expected?

治标:移除ismobilejs依赖。
治本:如何配置解决当前问题?

What is actually happening?

dist/js/chunk-vendors.js

/***/ "./node_modules/ismobilejs/esm/isMobile.js":
/*!*************************************************!*\
!*** ./node_modules/ismobilejs/esm/isMobile.js ***!
\*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isMobile; });
const appleIphone = /iPhone/i;
const appleIpod = /iPod/i;
const appleTablet = /iPad/i;
const androidPhone = /\bAndroid(?:. )Mobile\b/i;
const androidTablet = /Android/i;
const amazonPhone = /(?:SD4930UR|\bSilk(?:. )Mobile\b)/i;
const amazonTablet = /Silk/i;
const windowsPhone = /Windows Phone/i;
const windowsTablet = /\bWindows(?:. )ARM\b/i;
const otherBlackBerry = /BlackBerry/i;
const otherBlackBerry10 = /BB10/i;
const otherOpera = /Opera Mini/i;
const otherChrome = /\b(CriOS|Chrome)(?:. )Mobile/i;
const otherFirefox = /Mobile(?:. )Firefox\b/i;
function match(regex, userAgent) {
return regex.test(userAgent);
}
@tangjinzhou
Copy link
Member

ref #1890

@IceApriler
Copy link
Author

@tangjinzhou 这是啥意思?

@IceApriler
Copy link
Author

@tangjinzhou 大佬没说这问题怎么回事,也没说怎么解决啊,链接一个URL就关了😂

@tangjinzhou
Copy link
Member

已经有人提了pr 并在下个版本发布时修复 1.5.0-rc.5已修复

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants