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

使用Vue3运行到微信小程序的时候一直卡在Debugger attached. #15874

Open
lingegeA opened this issue Jun 12, 2024 · 0 comments
Open
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@lingegeA
Copy link

lingegeA commented Jun 12, 2024

相关平台

微信小程序

小程序基础库: 3.3.5
使用框架: Vue 3

复现步骤

项目在运行的时候会卡在Debugger attached:

Debugger attached.
👽 Taro v3.6.27

等了好久都没有反应, 下面附带了项目配置
有大佬帮忙看下吗

期望结果

正常运行

实际结果

~ pnpm run dev:weapp
Debugger attached.

[email protected] dev:weapp /Users/project/applet
NODE_ENV=production npm run build:weapp -- --watch

Debugger attached.

[email protected] build:weapp
taro build --type weapp --watch

Debugger attached.
👽 Taro v3.6.27
(会一直卡在这里, 不会出现编译进度条)

环境信息

Taro CLI 3.6.31 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
      Yarn: 1.22.19 - ~/.yarn/bin/yarn
      npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.27 => 3.6.27 
      @tarojs/components: 3.6.27 => 3.6.27 
      @tarojs/helper: 3.6.27 => 3.6.27 
      @tarojs/plugin-framework-vue3: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-alipay: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-h5: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-jd: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-qq: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-swan: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-tt: 3.6.27 => 3.6.27 
      @tarojs/plugin-platform-weapp: 3.6.27 => 3.6.27 
      @tarojs/runtime: 3.6.27 => 3.6.27 
      @tarojs/shared: 3.6.27 => 3.6.27 
      @tarojs/taro: 3.6.27 => 3.6.27 
      @tarojs/taro-loader: 3.6.27 => 3.6.27 
      @tarojs/webpack5-runner: 3.6.27 => 3.6.27 
      babel-preset-taro: 3.6.27 => 3.6.27 
      eslint-config-taro: 3.6.27 => 3.6.27 

项目配置

# package.json
{
  "name": "applet",
  "version": "1.0.0",
  "private": true,
  "description": "",
  "templateInfo": {
    "name": "vue3-pinia",
    "typescript": true,
    "css": "Sass",
    "framework": "Vue3"
  },
  "scripts": {
    "build:weapp": "taro build --type weapp",
    "build:swan": "taro build --type swan",
    "build:alipay": "taro build --type alipay",
    "build:tt": "taro build --type tt",
    "build:h5": "taro build --type h5",
    "build:rn": "taro build --type rn",
    "build:qq": "taro build --type qq",
    "build:quickapp": "taro build --type quickapp",
    "dev:weapp": "NODE_ENV=production npm run build:weapp -- --watch",
    "dev:swan": "npm run build:swan -- --watch",
    "dev:alipay": "npm run build:alipay -- --watch",
    "dev:tt": "npm run build:tt -- --watch",
    "dev:h5": "npm run build:h5 -- --watch",
    "dev:rn": "npm run build:rn -- --watch",
    "dev:qq": "npm run build:qq -- --watch",
    "dev:quickapp": "npm run build:quickapp -- --watch"
  },
  "browserslist": [
    "last 3 versions",
    "Android >= 4.1",
    "ios >= 8"
  ],
  "author": "",
  "license": "MIT",
  "dependencies": {
    "@babel/runtime": "^7.7.7",
    "@lucky-canvas/taro": "^0.0.14",
    "@nutui/nutui-taro": "^4.3.6",
    "@tarojs/components": "3.6.27",
    "@tarojs/helper": "3.6.27",
    "@tarojs/plugin-framework-vue3": "3.6.27",
    "@tarojs/plugin-platform-alipay": "3.6.27",
    "@tarojs/plugin-platform-h5": "3.6.27",
    "@tarojs/plugin-platform-jd": "3.6.27",
    "@tarojs/plugin-platform-qq": "3.6.27",
    "@tarojs/plugin-platform-swan": "3.6.27",
    "@tarojs/plugin-platform-tt": "3.6.27",
    "@tarojs/plugin-platform-weapp": "3.6.27",
    "@tarojs/runtime": "3.6.27",
    "@tarojs/shared": "3.6.27",
    "@tarojs/taro": "3.6.27",
    "dayjs": "^1.11.11",
    "pinia": "^2.0.10",
    "taro-plugin-pinia": "^1.0.0",
    "vue": "^3.2.24"
  },
  "devDependencies": {
    "@babel/core": "^7.8.0",
    "@nutui/auto-import-resolver": "^1.0.0",
    "@tarojs/cli": "3.6.27",
    "@tarojs/taro-loader": "3.6.27",
    "@tarojs/webpack5-runner": "3.6.27",
    "@types/node": "^18.15.11",
    "@types/webpack-env": "^1.13.6",
    "@typescript-eslint/eslint-plugin": "^5.20.0",
    "@typescript-eslint/parser": "^5.20.0",
    "@vue/babel-plugin-jsx": "^1.0.6",
    "@vue/compiler-sfc": "^3.0.0",
    "autoprefixer": "^10.4.19",
    "babel-preset-taro": "3.6.27",
    "css-loader": "3.4.2",
    "eslint": "^8.12.0",
    "eslint-config-taro": "3.6.27",
    "eslint-plugin-vue": "^8.0.0",
    "postcss": "^8.4.38",
    "style-loader": "1.3.0",
    "stylelint": "9.3.0",
    "tailwindcss": "^3.4.3",
    "ts-node": "^10.9.1",
    "typescript": "^4.1.0",
    "unplugin-vue-components": "^0.26.0",
    "vue-loader": "^17.0.0",
    "weapp-tailwindcss": "^3.1.1",
    "webpack": "^5.78.0"
  }
}


# Tailwind配置
/** @type {import('tailwindcss').Config} */
import plugin from 'tailwindcss/plugin'

module.exports = {
  content: [ './public/index.html', './src/**/*.{html,js,ts,jsx,tsx,vue}' ],
  corePlugins: {
    // 不需要 preflight,因为这主要是给 h5 的,如果你要同时开发小程序和 h5 端,你应该使用环境变量来控制它
    preflight: false
  },
  theme: {
    extend: {
      spacing: Array.from({ length: 1000 }).reduce((map, _, index) => {
        map[index] = `${index}rpx`
        return map
      }, {}),
    },
  },
  plugins: [
  ],
}
This was referenced Jun 15, 2024
@TheKonka TheKonka added V-3 Version - 3.x F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Status: Todo
Development

No branches or pull requests

2 participants