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.12.0 使用框架: React
// page.tsx
import CarKind from '@/hocs/CarKind' class Page extends Component<{}, State> { constructor(props) { super(props) } render() { return ( <View className='kind'> <CarKind /> </View> ) } } export default Page
// page.config.ts
export default {}
// CarKind.tsx 组件中引入微信原生小程序组件
class CarKind extends Component<{}, State> { constructor(props) { super(props) } render() { return ( <View> <native-component></native-component> </View> ) } } export default CarKind
// CarKind.config.ts
export default { usingComponents: { 'native-component': '../native/component', } }
打包生成的结果中有组件的usingComponents包含的原生组件
打包生成的结果缺少组件的usingComponents包含的原生组件
👽 Taro v1.3.18 Taro CLI 1.3.18 environment info: System: OS: macOS 12.3.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node Yarn: 1.22.18 - ~/.nvm/versions/node/v14.19.1/bin/yarn npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm npmPackages: @tarojs/async-await: 1.3.18 => 1.3.18 @tarojs/cli: ^3.4.8 => 3.4.8 @tarojs/components: 3.4.7 => 3.4.7 @tarojs/components-qa: 1.3.18 => 1.3.18 @tarojs/plugin-csso: 1.3.18 => 1.3.18 @tarojs/plugin-sass: 1.3.18 => 1.3.18 @tarojs/plugin-uglifyjs: 1.3.18 => 1.3.18 @tarojs/taro: 3.4.7 => 3.4.7 @tarojs/webpack-runner: 3.4.7 => 3.4.7 eslint-config-taro: 3.4.7 => 3.4.7 nerv-devtools: ^1.5.5 => 1.5.7 nervjs: ^1.5.5 => 1.5.7 react: ^17.0.0 => 17.0.2
使用的是taro的最新版本3.4.8。
附上解决办法:在页面的config.ts这把组件中引用的原生组件写进来加就行了。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.12.0
使用框架: React
复现步骤
// page.tsx
// page.config.ts
// CarKind.tsx 组件中引入微信原生小程序组件
// CarKind.config.ts
期望结果
打包生成的结果中有组件的usingComponents包含的原生组件
实际结果
打包生成的结果缺少组件的usingComponents包含的原生组件
环境信息
补充信息
使用的是taro的最新版本3.4.8。
附上解决办法:在页面的config.ts这把组件中引用的原生组件写进来加就行了。
// page.config.ts
The text was updated successfully, but these errors were encountered: