Skip to content

Commit

Permalink
chore(deps): upgrade weapp-tw to 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Nov 27, 2023
1 parent a82e0a3 commit c18b8ea
Show file tree
Hide file tree
Showing 4 changed files with 621 additions and 419 deletions.
9 changes: 5 additions & 4 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { UnifiedWebpackPluginV5 } from "weapp-tailwindcss/webpack";

const isH5 = process.env.TARO_ENV === "h5";
const isApp = process.env.TARO_ENV === "rn";
const WeappTailwindcssDisabled = isH5 || isApp;
// const isH5 = process.env.TARO_ENV === "h5";
// const isApp = process.env.TARO_ENV === "rn";
// const WeappTailwindcssDisabled = isH5 || isApp;

const config = {
projectName: 'taro-react-tailwind-vscode-template',
Expand Down Expand Up @@ -64,7 +64,8 @@ const config = {
args: [
{
appType: 'taro',
disabled: WeappTailwindcssDisabled
// disabled: WeappTailwindcssDisabled,
rem2rpx: true
}
]
}
Expand Down
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,50 +37,50 @@
],
"author": "",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@tarojs/components": "3.6.19",
"@tarojs/helper": "3.6.19",
"@tarojs/plugin-framework-react": "3.6.19",
"@tarojs/plugin-platform-alipay": "3.6.19",
"@tarojs/plugin-platform-h5": "3.6.19",
"@tarojs/plugin-platform-jd": "3.6.19",
"@tarojs/plugin-platform-qq": "3.6.19",
"@tarojs/plugin-platform-swan": "3.6.19",
"@tarojs/plugin-platform-tt": "3.6.19",
"@tarojs/plugin-platform-weapp": "3.6.19",
"@tarojs/react": "3.6.19",
"@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19",
"@babel/runtime": "^7.23.4",
"@tarojs/components": "3.6.20",
"@tarojs/helper": "3.6.20",
"@tarojs/plugin-framework-react": "3.6.20",
"@tarojs/plugin-platform-alipay": "3.6.20",
"@tarojs/plugin-platform-h5": "3.6.20",
"@tarojs/plugin-platform-jd": "3.6.20",
"@tarojs/plugin-platform-qq": "3.6.20",
"@tarojs/plugin-platform-swan": "3.6.20",
"@tarojs/plugin-platform-tt": "3.6.20",
"@tarojs/plugin-platform-weapp": "3.6.20",
"@tarojs/react": "3.6.20",
"@tarojs/runtime": "3.6.20",
"@tarojs/shared": "3.6.20",
"@tarojs/taro": "3.6.20",
"clsx": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@tarojs/cli": "3.6.19",
"@tarojs/webpack5-runner": "3.6.19",
"@types/node": "^20.9.2",
"@types/react": "^18.2.37",
"@tarojs/cli": "3.6.20",
"@tarojs/webpack5-runner": "3.6.20",
"@types/node": "^20.10.0",
"@types/react": "^18.2.38",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"babel-preset-taro": "3.6.19",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"babel-preset-taro": "3.6.20",
"eslint": "^8.54.0",
"eslint-config-taro": "3.6.19",
"eslint-config-taro": "3.6.20",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.2.0",
"postcss": "^8.4.31",
"postcss-rem-to-responsive-pixel": "^6.0.0",
"postcss-rem-to-responsive-pixel": "^6.0.1",
"react-refresh": "^0.14.0",
"stylelint": "^15.11.0",
"tailwindcss": "^3.3.5",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"typescript": "^5.3.2",
"weapp-ide-cli": "^1.0.1",
"weapp-tailwindcss": "^2.11.0",
"weapp-tailwindcss": "^3.0.0",
"webpack": "5.89.0"
}
}
10 changes: 0 additions & 10 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,5 @@ module.exports = {
plugins: {
tailwindcss: {},
// autoprefixer: {}
'postcss-rem-to-responsive-pixel': {
// 32 意味着 1rem = 32rpx
rootValue: 32,
// 默认所有属性都转化
propList: ['*'],
// 转化的单位,可以变成 px / rpx
transformUnit: 'rpx',
// postcss-rem-to-responsive-pixel@6 版本添加了 disabled 参数,用来禁止插件的转化
disabled: process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'rn'
},
}
};
Loading

0 comments on commit c18b8ea

Please sign in to comment.