浏览代码

chore: taro3.5 support

suzigang 3 年之前
父节点
当前提交
6fa61e2c8a

+ 1 - 0
src/sites/mobile-taro/vue/config/index.js

@@ -25,6 +25,7 @@ const config = {
     options: {}
   },
   framework: 'vue3',
+  compiler: 'webpack5',
   mini: {
     postcss: {
       pxtransform: {

+ 20 - 17
src/sites/mobile-taro/vue/package.json

@@ -37,29 +37,32 @@
   "dependencies": {
     "@babel/runtime": "^7.7.7",
     "@nutui/nutui-taro": "^3.1.18",
-    "@tarojs/components": "3.4.14",
-    "@tarojs/mini-runner": "3.4.14",
-    "@tarojs/runtime": "3.4.14",
-    "@tarojs/taro": "3.4.14",
-    "vue": "3.2.37"
+    "@tarojs/components": "^3.4.14",
+    "@tarojs/mini-runner": "^3.4.14",
+    "@tarojs/runtime": "^3.4.14",
+    "@tarojs/taro": "^3.4.14",
+    "vue": "^3.2.37"
   },
   "devDependencies": {
     "@babel/core": "^7.8.0",
-    "@tarojs/cli": "3.4.14",
-    "@tarojs/mini-runner": "3.4.14",
-    "@tarojs/plugin-framework-vue3": "3.4.14",
-    "@tarojs/plugin-html": "3.4.14",
-    "@tarojs/webpack-runner": "3.4.14",
+    "@tarojs/cli": "^3.5.4",
+    "@vue/babel-plugin-jsx": "^1.0.6",
+    "@tarojs/mini-runner": "^3.5.4",
+    "@tarojs/plugin-framework-vue3": "^3.5.4",
+    "@tarojs/plugin-html": "^3.5.4",
+    "webpack": "^5.69.0",
+    "@tarojs/webpack5-runner": "^3.5.4",
     "@types/webpack-env": "^1.13.6",
     "@typescript-eslint/eslint-plugin": "^4.15.1",
     "@typescript-eslint/parser": "^4.15.1",
-    "@vue/compiler-sfc": "3.2.34",
-    "babel-preset-taro": "3.2.10",
-    "eslint": "^6.8.0",
-    "eslint-config-taro": "3.2.10",
-    "eslint-plugin-vue": "^7.0.0",
-    "stylelint": "9.3.0",
-    "typescript": "4.6.4",
+    "@vue/compiler-sfc": "^3.0.0",
+    "babel-preset-taro": "^3.5.4",
+    "eslint": "^8.12.0",
+    "eslint-plugin-vue": "^8.0.0",
+    "eslint-config-taro": "^3.5.4",
+    "stylelint": "^9.3.0",
+    "style-loader": "^1.3.0",
+    "typescript": "^4.6.4",
     "vue-loader": "^16.0.0-beta.8"
   }
 }

+ 1 - 1
src/sites/mobile-taro/vue/src/pages/index/index.vue

@@ -31,7 +31,7 @@
   </div>
 </template>
 
-<script>
+<script lang="ts">
 import { reactive, toRefs } from 'vue';
 import { nav } from '../../../../../../config.json';
 import Taro from '@tarojs/taro';