最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - Visual Studio 2015 - Javascript ES6 not working - Stack Overflow

programmeradmin8浏览0评论

I am playing around with VS 2015 JavaScript/NodeJS IDE and I plan to use ES6 as the language style for JavaScript, however I am noticing that Visual Studio is not recognizing the ES6 (even though I read on various web sites that VS should recognize ES6).

Does anyone know how to make VS 2015 play nice (both in syntax highlighting, intellisense, etc) with ES6?

I also modified the file extension to be .JSX and .ES6 in case that would help VS pick up on it. No luck...

I am playing around with VS 2015 JavaScript/NodeJS IDE and I plan to use ES6 as the language style for JavaScript, however I am noticing that Visual Studio is not recognizing the ES6 (even though I read on various web sites that VS should recognize ES6).

Does anyone know how to make VS 2015 play nice (both in syntax highlighting, intellisense, etc) with ES6?

I also modified the file extension to be .JSX and .ES6 in case that would help VS pick up on it. No luck...

Share Improve this question asked Oct 19, 2015 at 21:58 E.S.E.S. 2,8416 gold badges41 silver badges76 bronze badges 1
  • Did you already look at stackoverflow.com/q/31544470/218196 ? – Felix Kling Commented Oct 19, 2015 at 23:24
Add a comment  | 

3 Answers 3

Reset to default 8

If you want IntelliSense for ES6 in a nodejs project, then you need to turn on a particular setting.

Open Tools → Options → Text editor → Node.js → IntelliSense and select the ES6 IntelliSense Preview checkbox.

In the December 2015 version of the tools, there is a link to additional notes about the prerequisites, such as having to install TypeScript for Visual Studio 2015 so that ES6 IntelliSense works.

@Shawn, in order to enable the Node.js options (and ES6 IntelliSense) you need to install the Visual Studio NodeJS Tools: https://www.visualstudio.com/en-us/features/node-js-vs.aspx

Try install TypeScript for Visual Studio 2015 and restart VS2015. https://www.microsoft.com/en-us/download/details.aspx?id=48593

I resolve many problem with this.

发布评论

评论列表(0)

  1. 暂无评论