Skip to content

vue-tsc reports errors on clean VitePress .md files #4662

Open
@cha-hin

Description

@cha-hin

Describe the bug

I followed the docs to enable IntelliSence support in VS Code.

Additionally, I'm using vue-tsc to perform type checking from the command line. My tsconfig file directly affects how vue-tsc behaves.

After enabling IntelliSense, running the command to type-check my source code (including VitePress-related files) now produces the following error(s):

Console output snippet:

$ vue-tsc --noEmit

Unable to resolve embedded: template -> template_inline_css
Unable to resolve embedded: template -> template_inline_ts_0
Unable to resolve embedded: template -> template_inline_ts_1

These errors appear only when the following options are included in the tsconfig file:

{
  "include": [
    "docs/**/*.ts",
    "docs/**/*.vue",
    "docs/**/*.md", // <-- this line
  ],
  "vueCompilerOptions": {
    "vitePressExtensions": [".md"], // <-- this line
  },
}

Reproduction

Create a new vite project (using vue & typescript):

npm create vite@latest
# select "Vue"
# select "TypeScript"

Open your tsconfig.json file and replace the content with the following:

{
  "extends": "@vue/tsconfig/tsconfig.dom.json",
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "docs/**/*.ts",
    "docs/**/*.vue",
    "docs/**/*.md"
  ],
  "vueCompilerOptions": {
    "vitePressExtensions": [".md"]
  }
}

Run the following command:

./node_modules/.bin/vue-tsc --noEmit

You should observe the following errors in the console output:

Unable to resolve embedded: template -> template_inline_css
Unable to resolve embedded: template -> template_inline_ts_0
Unable to resolve embedded: template -> template_inline_ts_1
Unable to resolve embedded: template -> template_inline_ts_2
Unable to resolve embedded: template -> template_inline_css
Unable to resolve embedded: template -> template_inline_css

Expected behavior

I expect that running the command vue-tsc --noEmit should not produce any warnings or errors when checking VitePress .md files, when these files don’t contain any issues.

System Info

System:
  OS: macOS 15.3.2
  CPU: (12) arm64 Apple M2 Pro
  Memory: 82.97 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 22.13.0 - ~/.nvm/versions/node/v22.13.0/bin/node
  Yarn: 1.22.22 - ~/.yarn/bin/yarn
  npm: 11.2.0 - ~/.nvm/versions/node/v22.13.0/bin/npm
  pnpm: 9.15.4 - ~/Library/pnpm/pnpm
  bun: 1.0.26 - ~/.bun/bin/bun
  Watchman: 2025.02.17.00 - /opt/homebrew/bin/watchman
Browsers:
  Chrome: 134.0.6998.166
  Safari: 18.3.1
  Safari Technology Preview: 18.4

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamRelated to the dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions