jd-opensource / jd-opensource/taro-ui

taro UI@2.3.4打包微信小程序后文件路径与引用路径不符

Open
#1,721 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

### Taro UI 版本信息

v2.3.4

### 问题描述

运行后小程序开发工具上提示weapp/npm/taro-ui/dist/weapp/components/tab-bar/index 路径下未找到组件,检查文件路径后发现路径不同。
取消提示页面的引用后发现其他引用Taro UI组件的页面均有该提示。
运行过程中未报错。

### 复现步骤

1.taro build --type weapp

### 复现代码

import { AtTabBar, } from 'taro-ui'

### 报错信息

[ pages/order-list/index.json 文件内容错误] pages/order-list/index.json: ["usingComponents"]["at-tab-bar"]: "../../npm/taro-ui/dist/weapp/components/tab-bar/index",在 D:\work\Taro-joylink_minipro\dist\weapp/npm/taro-ui/dist/weapp/components/tab-bar/index 路径下未找到组件(env: Windows,mp,1.06.2308310; lib: 3.2.4)

### 系统信息

Taro CLI 2.2.21 environment info:
System:
OS: Windows 10
Binaries:
Node: 14.21.3 - D:\setup\nvm\nodejs\node.EXE
Yarn: 1.22.19 - D:\setup\nvm\node_global\yarn.CMD
npm: 6.14.18 - D:\setup\nvm\nodejs\npm.CMD

"@tarojs/components": "2.2.16",
"@tarojs/components-qa": "2.2.16",
"@tarojs/plugin-sass": "^2.2.10",
"@tarojs/plugin-uglify": "^2.2.10",
"@tarojs/redux": "2.2.16",
"@tarojs/router": "2.2.16",
"@tarojs/taro": "2.2.16",
"@tarojs/taro-alipay": "2.2.16",
"@tarojs/taro-weapp": "2.2.16",
"taro-ui": "^2.3.0",

### 补充信息

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.