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

【需求完善】script内容为空时不能识别到正确的name #5

Open
Megasu opened this issue Feb 20, 2022 · 2 comments
Open

Comments

@Megasu
Copy link

Megasu commented Feb 20, 2022

需求完善

  • 遇到一个问题,当 script 内容为空时,调试工具不能识别出正确的 name
  • 开源不易,期待作者完善该功能,辛苦了。🌹🌹🌹

image

调试工具版本

  • VueDevTools 6.0.8

项目 package.json

{
  "name": "rabbit-vue3-ts",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vue-tsc --noEmit && vite build",
    "preview": "vite preview --port 5050",
    "typecheck": "vue-tsc --noEmit",
    "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
  },
  "dependencies": {
    "@vueuse/core": "^7.6.2",
    "axios": "^0.26.0",
    "less": "^4.1.2",
    "normalize.css": "^8.0.1",
    "pinia": "^2.0.11",
    "pinia-plugin-persistedstate": "^1.2.2",
    "vite-plugin-vue-setup-extend": "^0.4.0",
    "vue": "^3.2.29",
    "vue-router": "^4.0.12"
  },
  "devDependencies": {
    "@rushstack/eslint-patch": "^1.1.0",
    "@types/node": "^16.11.22",
    "@vitejs/plugin-vue": "^2.1.0",
    "@vitejs/plugin-vue-jsx": "^1.3.3",
    "@vue/eslint-config-prettier": "^7.0.0",
    "@vue/eslint-config-typescript": "^10.0.0",
    "@vue/tsconfig": "^0.1.3",
    "eslint": "^8.5.0",
    "eslint-plugin-vue": "^8.2.0",
    "prettier": "^2.5.1",
    "typescript": "~4.5.5",
    "vite": "^2.7.13",
    "vue-tsc": "^0.31.1"
  }
}
@codexu
Copy link

codexu commented Feb 21, 2022

顶一个,不过影响不大,坐等更新

@chenxch
Copy link

chenxch commented Mar 25, 2022

这个问题我也尝试修复了一下,内容为空的script标签不会别标记为可编译script,我通过正则让其进去转换环节,强行编译scirpt过程中@vue/compiler-sfc就报错了,你可以写个注释在script内,让其被标记为可编译的script。
如果你并没有实际使用setup去做更多的事情的话,建议用defineComponent。

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

3 participants