Skip to content

Conversation

@ackzell
Copy link
Contributor

@ackzell ackzell commented Apr 28, 2021

Some Meteor plugins require to have a lang="js" attribute (see https://github.com/Hernanm0g/meteor-vuetify-loader#installation)
image

But in turn, Vetur does not support this: https://github.com/vuejs/vetur/blob/master/docs/guide/highlighting.md#syntax-highlighting

image

Vetur doc talks about highlighting syntax, but formatting code using Vetur will not work if there is a lang="js" for me

TL;DR:
Figured this being the middle ground would be a good spot to make both things work (auto imports for meteor-vuetify-loader as well as code formatting in VScode using Vetur.

Some Meteor plugins require to have a `lang="js"` attribute (see https://github.com/Hernanm0g/meteor-vuetify-loader#installation)
But in turn, Vetur does not support this:  https://github.com/vuejs/vetur/blob/master/docs/guide/highlighting.md#syntax-highlighting

(Vetur doc talks about highlighting syntax, but formatting code using Vetur will not work if there is a `lang="js"` for me)
@ackzell
Copy link
Contributor Author

ackzell commented Mar 30, 2022

I am still very much using this setup and my best solution so far is to

  • remove the lang="js" attribute from the script tag in my code when I want to let the formatter kick in
  • add it back if I want my app to actually work

Alternatively

  • run the formatter (Prettier) right before committing my changes via an npm task. Which is not really a great DX to be honest. ☹️

@Akryum Akryum changed the title Default lang value for script blocks fix: Default lang value for script blocks Apr 27, 2023
@Akryum Akryum merged commit 7646adc into meteor-vue:master Apr 27, 2023
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

Successfully merging this pull request may close these issues.

2 participants