WebStorm/JetBrains: cannot recognize es6 syntax in a .vue file
Finally got a simple solution, in your .vue
file, just add the lang="babel"
as an attribute in your <script>
tag:
<template> <!-- markup content --></template><script lang="babel"></script>
You can add lang="babel" or type="text/ecmascript-6" to tag.
<script lang="babel"></script>
or:
<script type="text/ecmascript-6"></script>
In addition, Visual Studio Code has some good plugin of vue, you can have a try.