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

引入 andt-mini 部分组件仍然报错 #1055

Open
zyaxuan opened this issue Jul 21, 2022 · 2 comments
Open

引入 andt-mini 部分组件仍然报错 #1055

zyaxuan opened this issue Jul 21, 2022 · 2 comments
Labels
processing will provide or fix soon

Comments

@zyaxuan
Copy link

zyaxuan commented Jul 21, 2022

问题描述
image

引入antd-mini 部分组件仍然报错,测试有如下组件

{
    "usingComponents": {
      "antd-button": "antd-mini/es/Button/index", // 报错
      "empty": "antd-mini/es/Empty/index", // 报错
      "stepper": "antd-mini/es/Stepper/index", // 报错
      "terms": "antd-mini/es/Terms/index", // 报错
      "tips": "antd-mini/es/Tips/index", // 报错
      "dialog": "antd-mini/es/Dialog/index", // 报错
      "loading": "antd-mini/es/Loading/index", // 报错
      "toast": "antd-mini/es/Toast/index" // 报错
    }
  }

"@mpxjs/webpack-plugin": "^2.7.45", 已更新到最新版
modeRules 已配置

{
modeRules: {
    ali: {
      include: [resolve('node_modules/antd-mini')]
    }
  }
}
@Blackgan3 Blackgan3 added the processing will provide or fix soon label Jul 25, 2022
@Blackgan3
Copy link
Collaborator

antd-mini 中的sjs存在 export xxx 的语法,框架对这块的处理有些问题,正在修复中哈,修复后第一时间通知

@Blackgan3
Copy link
Collaborator

可以参照次demo来进行问题规避

首先配置Loading组件index.sjs文件的 alias 到项目src中的index.sjs
image

在本地修改 sjs 文件中的导出方式为 export default
image

如此,即可正常运行,其他跨平台编译的判断还保持你的项目配置就行。

mpx-antd-mini.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processing will provide or fix soon
Projects
None yet
Development

No branches or pull requests

2 participants