madskristensen / VuePack

Other
61 stars 7 forks source link

es6 import/export syntax highlight error #2

Closed Tupbich closed 7 years ago

Tupbich commented 8 years ago

Installed product versions

es6 import/export syntax highlight error

Steps to recreate

  1. Create new .vue file
  2. Create script block
  3. Type import foo from './foo';

    Screenshot

image

cybertino commented 8 years ago

@madskristensen Try <script type="text/babel">. Not sure whether it helps as I cannot manage VuePack to work in my Visual Studio.

tiansh commented 8 years ago

It seems that this plugin just tell VS .vue is yet another extension for HTML files. So VS just parse this file using parser for HTML. But <script>s inlined in an HTML file is NOT allowed to write export (since you cannot do import xxx.html in another file). That's why VS complain these code as invalid.

detaybey commented 8 years ago

any fix for this? without the import expression, this extension becomes useless as no vue application is with a single .vue file.

madskristensen commented 8 years ago

The only thing you can do is to disable javascript validation in Tools -> Options. This extension cannot fix it, since there are no APIs to control the behavior.

pimboden commented 7 years ago

Hello. I installed the package, but It seems that its not working at all. No highlighting, no intellisence, nothing at all. What am I doing wrong. I have VS2015 with update 3 I also don't know where to disable javascript validation... cant't fin it in tools/options

cuibty commented 7 years ago

+1

cucr commented 7 years ago

i have same problem,how to support ES6 features in .vue file?

zeeglenn commented 7 years ago

same, no highlighting for vue files. the icon did change...

Eshva commented 7 years ago

+1

Eshva commented 7 years ago

May be this can help? https://msdn.microsoft.com/en-us/library/bb165071.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-3

Eshva commented 7 years ago

Here some workarounds. It's about JSX but could be useful. For me works Solution 1. http://stackoverflow.com/a/34110461/156991

csicky commented 7 years ago

Visual Studio WAS always the best IDE. Now I use VS Code but still miss VS's power. It looks like not even with extensions VS can't be fixed to bring it's (now lost) great development experience. What I read about VS 2017 seems to be the same. I was really hoping VS 2017 would allow me to come back from VS Code. WebStorm and many others are leaving VS behind and Microsoft doesn't seem to notice or even care. By the time Microsoft brings support to some js library people already use a newer one. The only hope left is in VS Code, but that too needs extensions to get to an acceptable level.

@madskristensen - I really appreciate you great work over the years. You managed to keep VS as usable as you could for modern web development. The problem is that the framework is not allowing you to actually succeed in this.

I arrived to this issue page searching for "visual studio vue.js".

madskristensen commented 7 years ago

This cannot be fixed in VS2015, but I just released a version of this extension for VS2017 which supports the import/export statements https://marketplace.visualstudio.com/items?itemName=MadsKristensen.VuejsPack-18329

mrns commented 7 years ago

Hi @madskristensen, thanks for your work! Just wanted to let you know that I have installed the v1.1.8 and still get this javascript ES6 Syntax Error. Should I install any other extension besides VuePack 2017?

image

ceferrari commented 6 years ago

@mrns same issue here

fritz-net commented 6 years ago

I really like the extension, however I have the same problem: image

<script type="text/babel> totally disables syntax checking & highlighting