Vetur: Vetur generates invalid comments in PostCSS

Created on 15 Aug 2018  路  2Comments  路  Source: vuejs/vetur

  • [x] I have searched through existing issues
  • [x] I have read through docs
  • [x] I have read FAQ

Info

  • Platform: macOS 10.13
  • Vetur version: 0.12.6
  • VS Code version: 1.25.1

Problem

Single line // ... comments are not valid for postcss's default parser. VSCode's "Toggle Line Comment" inside lang="postcss" with Vetur should generate /* ... */ instead.

Reproducible Case

<style lang="postcss">
// @import '..';
</style>
bug language-config

Most helpful comment

Sounds good. CSS spec also does not include // comment. It's allowed only in SCSS.

All 2 comments

Platform: macOS 10.12.6
Vetur version: 0.12.6
VS Code version: 1.28.0 Insider

I have the same problem, it also appears in separate *.css files which have language mode PostCSS set. When I switch off Vetur, I get the correct /* */comments, when switched on, I get the // comment style.

Sounds good. CSS spec also does not include // comment. It's allowed only in SCSS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deangoku picture deangoku  路  3Comments

gabrielboliveira picture gabrielboliveira  路  3Comments

OsterHuang picture OsterHuang  路  3Comments

Dealerpriest picture Dealerpriest  路  3Comments

muhajirdev picture muhajirdev  路  3Comments