Skip to content

v1 version supports vite, old projects use v1 version of ant-design-vue #4722

@xunuo0x

Description

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

Version

1.7.7

Environment

Vue v2.6.10, ant-design-vue v1.7.8, Vite v2.6.1

Reproduction link

https://github.com/vueComponent/ant-design-vue/blob/1.x/components/_util/moment-util.js

Steps to reproduce

vue2 项目中使用 ant-design-vue,并且使用 vite 进行构建

What is expected?

修改 moment-util.js 中 moment.js 的引用即可。
import * as moment from 'moment';
修改为
import moment from 'moment';

What is actually happening?

vite dev 失败

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions