Open g0ne150 opened 7 years ago
The same.
import {Loading, MessageBox as EMB} from 'element-ui'
import {Indicator, Toast, MessageBox as MMB} from 'mint-ui'
It report: These dependencies were not found:
To install them, you can run: npm install --save antd/lib/e-m-b antd/lib/m-m-b
babel.config.js
module.exports = {
presets: ['@vue/app'],
plugins: [
[
'component',
{
libraryName: 'mint-ui',
style: true
},
'mint-ui'
],
[
'component',
{
libraryName: 'element-ui',
styleLibraryName: 'theme-chalk'
},
'element-ui'
]
]
}
script
import { Button as mtButton } from 'mint-ui'
import { Button as elButton } from 'element-ui'
These dependencies were not found:
你应该是用了两种ui框架,同时引入了两个Button组件。 我的解决方案是:建两个文件去分别引入 ui.el.js: import { Button } from 'element-ui'; ui.mint.js: import { Button } from 'mint-ui'; 然后再引入他们 import './ui.el'; import './ui.mint'; 你会发现问题解决了 @g0ne150 @zzx18023 @yoyo837
使用
import { Button as Ebutton } from 'element-ui'
报错 报错内容如图 babelrc 配置webpack 版本 2.4.1