Are you getting the ES6 Warning in VS Code?

Image

The new Visual Studio Code (0.9.2 as of this writing) comes with ECMAScript 2015 support, better known as ES6. The default behavior, however, is set to ES5; so when you open a file that needs ES6 support you get the following warning:

This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6

To fix this issue add a jsconfig.json file on the root folder of your project

    {
      "compilerOptions": {
        "target": "ES6",
        "module": "commonjs"
      }
    }

There are some people who suggested saving the jsconfig.json file under the app/src folder (see this post). However, that didn’t work for me.

Me

Luis Cabrera is a family man and a dedicated dad. He lives in Florida, where he works as an Applications Architect for one of the most recognizable brands in the US. In his spare time, Luis likes to develop apps using ionic and Firebase. Aside from technology and family, he enjoys the outdoors and working on his horse farm.

Older posts...

Written by

Get in touch!

Notice any mistakes?
Leave me a message