Skip to content

使用 morjs 创建项目,在微信端遇到组件引入的错误 #1406

Open
@starao520

Description

在项目启动的时候,如果引入的组件不带es,比如"ant-tab-bar": "antd-mini/TabBar/index",项目会启动失败;但是如何带了 es启动正常了,用微信开发者工具打开后,会报错。现在的解决方法是,不带 带 es启动项目,然后去掉 es重新再编译,这样项目不会报错,微信打开也是正常的,就是有点麻烦

Image

组件

ant-tab-bar

基础库版本

3.7.8

设备机型

微信开发者工具的模拟器

手机系统

模拟器中使用的机型为iPhone12 pro

APP

微信

组件库版本

3.1.3

预期行为

项目 启动之后,用微信开发者打开能直接调试

复现步骤

  1. 在项目中引入组件时带 es,比如"ant-tab-bar": "antd-mini/es/TabBar/index"
  2. 启动之后,打开微信开发者工具,加入编译好的对应的 wechat 文件夹

复现 demo

Image Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions