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

无法在 vite 和 remix 中使用 #638

Closed
hungtcs opened this issue Apr 1, 2024 · 6 comments · Fixed by #653
Closed

无法在 vite 和 remix 中使用 #638

hungtcs opened this issue Apr 1, 2024 · 6 comments · Fixed by #653

Comments

@hungtcs
Copy link

hungtcs commented Apr 1, 2024

Vite 仍然识别为 commonjs 模块

10:06:31 AM [vite] Internal server error: [vite] Named export 'SearchOutlined' not found. The requested module '@ant-design/icons' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@ant-design/icons';
const {PlusOutlined, SearchOutlined} = pkg;

环境信息

System:
    OS: macOS 14.3.1
    CPU: (8) arm64 Apple M3
    Memory: 1.64 GB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/Library/Caches/fnm_multishells/6443_1711935576953/bin/node
    npm: 10.2.4 - ~/Library/Caches/fnm_multishells/6443_1711935576953/bin/npm
    pnpm: 8.15.3 - ~/Library/Caches/fnm_multishells/1364_1711932698803/bin/pnpm
  Browsers:
    Chrome: 123.0.6312.87
    Safari: 17.3.1
  npmPackages:
    vite: ^5.2.7 => 5.2.7

相关 Issues

ref #477
duplicate #605

@afc163
Copy link
Member

afc163 commented Apr 1, 2024

来个 PR?

@hungtcs
Copy link
Author

hungtcs commented Apr 1, 2024

@afc163 我目前还正在调试,这个问题是我升级 antd 后出现的,等我弄清楚具体原因哈

@afc163
Copy link
Member

afc163 commented Apr 1, 2024

@hungtcs 辛苦啦

@hungtcs
Copy link
Author

hungtcs commented Apr 1, 2024

@afc163 我发现 es/icons 里面的所有文件都没有生成类型声明,但是不知道怎么排查。

image

@hungtcs
Copy link
Author

hungtcs commented Apr 1, 2024

Duplicate #605

@afc163
Copy link
Member

afc163 commented Jul 21, 2024

Fixed in @ant-design/icons@5.4.0: #653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants