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

Typescript not detecting errors when using Pug with Vue.js #3420

Open
lisandromdc opened this issue Nov 25, 2023 · 1 comment
Open

Typescript not detecting errors when using Pug with Vue.js #3420

lisandromdc opened this issue Nov 25, 2023 · 1 comment

Comments

@lisandromdc
Copy link

I'm an old fan of pug! Currently I'm working on a Vue.js really huge proyect where the type-check of Typescript is crucial to avoid break anything on any update.

No mather whatever I do, typescript is not finding any error on the "template" (pug) part of the .vue file. It just check the "script" part.
This is absolutely important for me, because prevents lots of errors when usingi not defined keys for some variables or things like that

@QuincyX
Copy link

QuincyX commented Dec 7, 2023

it works for me

index.vue Doctor
❗ @vue/language-plugin-pug missing
For , the @vue/language-plugin-pug plugin is required. Install it using $ npm install -D @vue/language-plugin-pug and add it to vueCompilerOptions.plugins to support TypeScript intellisense in Pug templates.

package.json

{
  "devDependencies": {
    "@vue/language-plugin-pug": "latest"
  }
}

tsconfig.json / jsconfig.json

{
  "vueCompilerOptions": {
    "plugins": [
      "@vue/language-plugin-pug"
    ]
  }
}

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

2 participants