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

the ant-design-vue of v1.7.8 has a bug with vite #5717

Closed
1 task done
sxlleo opened this issue Jun 16, 2022 · 3 comments
Closed
1 task done

the ant-design-vue of v1.7.8 has a bug with vite #5717

sxlleo opened this issue Jun 16, 2022 · 3 comments
Labels
1.x version 1.x outdated

Comments

@sxlleo
Copy link

sxlleo commented Jun 16, 2022

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

Version

1.7.7

Environment

vue2

Reproduction link

https://1x.antdv.com/components/menu-cn/

Steps to reproduce

1、build the vue2 project witch use ant-design-vue of v1.7.8 with vite;
2、vite preview;

What is expected?

can brower

What is actually happening?

there is an error in devtool console, tips is "require is not defined", i guess mutationobserver-shim trigger the error

@tangjinzhou tangjinzhou added the 1.x version 1.x label Jun 17, 2022
@tangjinzhou
Copy link
Member

1.x 不会默认支持 vite,可以自行配置(百度、google)

@nooooooom
Copy link

这么配置可以解决

// vite.config.js
build: {
    commonjsOptions: {
      transformMixedEsModules: true
    }
  },

@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 Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.x version 1.x outdated
Projects
None yet
Development

No branches or pull requests

3 participants