1

My question is very similar to this. It is not a duplicate because this specifically involves Vetur (the VS Code extension for Vue).

Most Babel code still parses just fine, so no errors are shown. However, any plugin that introduces new syntax will display errors, as Vetur is unaware of the syntax plugin.

In my specific case, I'm using the transform-do-expressions plugin, which displays "expression expected" on do and "'while' expected" on the closing brace.

I'm using single-file components, otherwise the solution in the related post would work. Is there any way to tell the Vetur extension that it should use the Babel parser (with the relevant plugins) instead of vanilla JS?

The code compiles, of course. It's just the IDE.

jhpratt
  • 6,841
  • 16
  • 40
  • 50

0 Answers0