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

designWidth 设置 function,校验配置的协议报错 #12463

Closed
yzw7489757 opened this issue Sep 8, 2022 · 6 comments
Closed

designWidth 设置 function,校验配置的协议报错 #12463

yzw7489757 opened this issue Sep 8, 2022 · 6 comments
Labels
A-docs Area - 文档相关 F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@yzw7489757
Copy link

相关平台

H5

浏览器版本: 未至运行
使用框架: React

复现步骤

设置config/index.js

config = {
   designWidth(input) {
    if (input.file.replace(/\\ /g, '/').indexOf('@xy/xxx') > -1) {
      return 375
    }
    return 750
  },
}
yarn dev:h5

期望结果

@xy/xxx 设计单位变更为 375

实际结果

Taro 配置有误,请检查! (/Users/xxx/config/index.js)
[✗] designWidth 应该为一个数字

环境信息

👽 Taro v3.5.3


  Taro CLI 3.5.3 environment info:
    System:
      OS: macOS 12.5.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 14.19.2 - ~/.nvm/versions/node/v14.19.2/bin/node
      Yarn: 1.22.18 - ~/.nvm/versions/node/v14.19.2/bin/yarn
      npm: 6.14.17 - ~/.nvm/versions/node/v14.19.2/bin/npm
    npmPackages:
      @tarojs/cli: 3.4.7 => 3.4.7 
      @tarojs/components: 3.4.7 => 3.4.7 
      @tarojs/mini-runner: 3.4.7 => 3.4.7 
      @tarojs/react: 3.4.7 => 3.4.7 
      @tarojs/rn-runner: 3.4.7 => 3.4.7 
      @tarojs/router: 3.4.7 => 3.4.7 
      @tarojs/runtime: 3.4.7 => 3.4.7 
      @tarojs/taro: 3.4.7 => 3.4.7 
      @tarojs/taro-rn: 3.4.7 => 3.4.7 
      @tarojs/webpack-runner: 3.4.7 => 3.4.7 
      babel-preset-taro: 3.4.7 => 3.4.7 
      eslint-config-taro: 3.4.7 => 3.4.7 
      react: ^17.0.2 => 17.0.2 
      react-native: ^0.66.4 => 0.66.4 

image

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Sep 8, 2022
@yzw7489757
Copy link
Author

image

@yzw7489757
Copy link
Author

image

@TheKonka
Copy link
Member

TheKonka commented Sep 9, 2022

7cb197a

#11952

升级到3.4.13看看

@ZakaryCode
Copy link
Contributor

文档错误,已经更新

请保持 cli 和项目内版本依赖一致

@ZakaryCode ZakaryCode added A-docs Area - 文档相关 to be closed labels Sep 13, 2022
@TheKonka
Copy link
Member

文档错误,已经更新

请保持 cli 和项目内版本依赖一致

文档咋打不开了,哥
image

@ZakaryCode
Copy link
Contributor

文档错误,已经更新

请保持 cli 和项目内版本依赖一致

文档咋打不开了,哥 image

多了 README ,删了就行

@taro-bot2 taro-bot2 bot removed the to be closed label Sep 20, 2022
@taro-bot2 taro-bot2 bot closed this as completed Sep 20, 2022
@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area - 文档相关 F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

3 participants