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

微信小程序如果使用taro框架,能否支持npm安装 #558

Open
vaggrant opened this issue Jan 8, 2019 · 3 comments
Open

微信小程序如果使用taro框架,能否支持npm安装 #558

vaggrant opened this issue Jan 8, 2019 · 3 comments

Comments

@vaggrant
Copy link

vaggrant commented Jan 8, 2019

现在只有类vue框架的微信小程序支持npm安装。
能否支持react框架的taro框架支持npm安装

@leeyeh
Copy link
Contributor

leeyeh commented Jan 8, 2019

如果这个 issue( NervJS/taro#1203 )中提到的功能被 taro 支持了,直接正常用 npm 安装即可在编译到不同平台的时候自动使用不同版本的 SDK。

在此之前,安装完之后需要从指定路径引入小程序 SDK:

import AV from 'leancloud-storage/dist/av-weapp.js'

@vaggrant
Copy link
Author

vaggrant commented Jan 8, 2019

了解了。谢啦。我会关注taro的进展的

@leeyeh
Copy link
Contributor

leeyeh commented Mar 23, 2020

自 v4.5.0 起,SDK 开放了配置 Adapter 来支持不同的平台。对于 Taro,可以自行使用 taro 提供的 API(几乎与微信小程序一致)来实现 adapter 从而实现所有平台使用一套代码,无需从不同的路径引入不同平台的 SDK。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants