Vue Attribute is not allowed here

Hello,  recently  I was using vue without any issue with previous versions of phpstorm

 

but now after latest update I get 

Attribute v-model is not allowed here

 

Also there's no autocomplete for vue component in html file 

 

How can make phpstorm support vue like before ?

9 comments
Comment actions Permalink

Is the Vue.js plugin enabled at Settings | Plugins?

0
Comment actions Permalink

What file is it - .vue or .html?

Vue.js plugin only supports single-file components with a .vue extension (https://vuejs.org/v2/guide/single-file-components.html). Components in .html files are not supported, Vue.js directives are not recognized there... And it is unlikely that they will be supported in future

0
Comment actions Permalink

Hello, it's  html and the plugn on activated,  it was working in previous builds but not in new one that's why I asked. 

0
Comment actions Permalink

As I wrote, Vue components in .html files are not supported; Vue.js plugin only works for components defined in .vue files

0
Comment actions Permalink

Elena, a lot of people use vue outside of .vue files - really, a lot!

.vue files are typically used in single page apps, but most projects where vue is used as "sugar on top" with a regular website do just add them to html (twig, blade, ...) files. Single file components are an optional feature of Vue.

Please consider adding support for this - this is a complete deal breaker for me and I'm sure many others. I won't be able to use PHPStorm any longer and am stuck on the previous version.

3
Comment actions Permalink

Please vote for https://youtrack.jetbrains.com/issue/WEB-32274 and https://youtrack.jetbrains.com/issue/WEB-32255 to be notified on any progress with these features.

To be frank, we don’t have any immediate plans to provide support for components in .html/.php etc. files. To provide a good development experience for these components, we need to invest significant resources and right now we want to keep our focus on improving for support for the more commonly used single-file components, there’re still a lot of things we need to do in this area.

0
Comment actions Permalink

Hi, given that you won't be supporting vue in .html files for the forseeable future (very disappointing), can you please advise how to stop intellij IDEA from showing the vue tags as invalid at least?

0
Comment actions Permalink

IDEA normally suggests adding unknown attributes/tags to the list of custom elements: hit Alt+Enter on highlighted tag, choose to add it to custom HTML tags:

0
Comment actions Permalink

Great. Thank you.

0

Please sign in to leave a comment.