Skip to main content

taro

caution
  • 不支持 data-attr #11530
  • 不会转译外部依赖
    • 例如 ??, ?.
npm install -g @tarojs/cli
# npm install -g mirror-config-china

# npx -y @tarojs/cli init my-app
taro init my-app

cd my-app

# 微信小程序
# ==========
# 下载 https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html
# 选择根目录下 dist
# 关闭 ES6 转 ES5
# 关闭上传代码时样式自动补全
# 关闭代码压缩上传
pnpm dev:weapp

NODE_ENV=production pnpm dev:weapp
Taro.ENV_TYPE;
const { app, route, page } = Taro.Current;
typefor
ALIPAY支付宝小程序
JD京东小程序
QQQQ 小程序
SWAN百度小程序
TT字节跳动小程序
WEAPP微信小程序
RNReact Native
WEBWeb

tailwindcss

多端

app平台自己taro
微信小程序project.config.jsonproject.config.json
百度小程序project.swan.jsonproject.swan.json
字节跳动小程序project.config.jsonproject.tt.json
QQ 小程序project.config.jsonproject.qq.json
支付宝小程序mini.project.jsonproject.alipay.json
京东小程序
飞书小程序project.config.jsonproject.lark.json

FAQ

Invalid option from onResolve() callback in plugin "scanImports": "importer"

taro immer

{
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
},
}
diff --git a/package.json b/package.json
index 636a5d3b2d692851b3eda9bd18d6c4c22f8362c6..54999c2456b6114a946228785cb3a33b187fc4ac 100644
--- a/package.json
+++ b/package.json
@@ -7,12 +7,12 @@
"exports": {
".": {
"types": "./dist/immer.d.ts",
- "import": "./dist/immer.mjs",
+ "import": "./dist/immer.legacy-esm.js",
"require": "./dist/cjs/index.js"
}
},
- "jsnext:main": "dist/immer.mjs",
- "react-native": "dist/immer.mjs",
+ "jsnext:main": "dist/immer.legacy-esm.js",
+ "react-native": "dist/immer.legacy-esm.js",
"source": "src/immer.ts",
"types": "./dist/immer.d.ts",
"sideEffects": false,