Skip to content

beta版本 怎么配合按钮加载插件使用 #2956

@bosens-China

Description

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

Version

2.0.0-beta.10

Environment

windows 10,chrome:86 vue 3.0

Reproduction link

https://vuecomponent.github.io/issue-helper/

Steps to reproduce

直接按照文档描述在babel配置文件

module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
// plugins: [
//   [
//     'import',
//     { libraryName: 'ant-design-vue', libraryDirectory: 'es', style: true },
//   ],
// ],
};

会提示antd不存在
// main.js

import antd from 'ant-design-vue';
import 'ant-design-vue/components/style';

export default (vm) => {
vm.use(antd);
};

What is expected?

期待按需加载正常工作

What is actually happening?

报错

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions