vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.55k stars 373 forks source link

When use `Self-reference` in SFC, throw `Unable to resolve path to module`. #4432

Closed JuerGenie closed 3 weeks ago

JuerGenie commented 3 weeks ago
image

But it's work fine in .ts file:

image

This is my tsconfig.json:

{
  "compilerOptions": {
    "moduleResolution": "bundler"
  },

  "include": ["."],
  "exclude": ["dist", "build", "node_modules"]
}

and this is my package.json:

{
  "name": "@chrock/vue-excalibur",
  "version": "0.1.0",
  "private": true,
  "main": "./index.ts",
  "types": "./index.ts",
  "exports": {
    ".": "./index.ts",
    "./*": "./components/*.vue"
  },
  "peerDependencies": {
    "excalibur": "^0.29.3",
    "vue": "^3.4.21"
  },
  "devDependencies": {
    "typescript": "^5.4.5"
  }
}

about Self-reference: Node.js and Typescript