We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
小程序基础库: 2.14.3 使用框架: React
// config/index.js import { resolve } from 'path' alias: { '@vant-weapp': resolve(__dirname, '..', 'node_modules/@vant/weapp/dist') },
// pages/index/index.config.js export default { navigationBarTitleText: '首页', usingComponents: { 'van-button': '@vant-weapp/button/index', 'van-calendar': '@vant-weapp/calendar/index' } } ## 报错信息 ```shell [ dist/pages/index/index.json 文件内容错误] dist/pages/index/index.json: ["usingComponents"]["van-button"]: "@vant-weapp/button/index" 未找到
taro -cli 2.x 会这样编译解析:
// packages/taro-cli/src/weapp.js Object.keys(usingComponents).map(async item => { const componentPath = usingComponents[item] let componentPath = usingComponents[item] if (Util.isAliasPath(componentPath, pathAlias)) { componentPath = Util.replaceAliasPath(configFile, componentPath, pathAlias) usingComponents[item] = componentPath }
路径别名可以被正确解析
路径别名可以未能被解析
� Taro v3.0.22 Taro CLI 3.0.22 environment info: System: OS: Windows 10 Binaries: Node: 12.18.0 - E:\nvmNode\node.EXE Yarn: 1.22.4 - E:\nvmNode\yarn.CMD npm: 6.14.4 - E:\nvmNode\npm.CMD
The text was updated successfully, but these errors were encountered:
ce56d5b
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.14.3
使用框架: React
复现步骤
源码
补充
taro -cli 2.x 会这样编译解析:
期望结果
路径别名可以被正确解析
实际结果
路径别名可以未能被解析
环境信息
The text was updated successfully, but these errors were encountered: