Import does not work with JavaScript in PhpStorm

I am trying to run a piece of JavaScript code written in a tutorial that looks like this:

main.js

import Vue from 'Vue'; import Alert from './components/Alert.vue'; new Vue({ el: 'body', components: { Alert } }) 

However, PhpStorm gives the following error:

Ads import not supported by current version of JavaScript

How can I get a newer (?) Version of JavaScript in PhpStorm? Is this really a problem here?

+43
javascript ecmascript-6 phpstorm
Mar 29 '16 at 21:34
source share
1 answer

In your settings, change the javascript version to ECMAScript 6.

+110
Mar 29 '16 at 21:36
source share



All Articles