https://stackoverflow.com/questions/36295525/import-not-working-with-javascript-in-phpstorm
In your preferences, change the version of javascript to ECMAScript 6.
|
|
| Thank you for your answer. PhpStorm is no longer showing an error; however, the Chrome console is displaying this: Uncaught SyntaxError: Unexpected token import - main.js:1 Do you know what is going on here? – user3089840 Mar 29 '16 at 22:27 |
| Actually I believe it is an unrelated error. Thanks again! – user3089840 Mar 29 '16 at 22:35 |
| Now it is asking me whether I want to use Babel to convert from 6 to 5.1. – nu everest Aug 29 '16 at 19:02 |
| ok... So tell it what you want to do @nueverest yes or no ;-) – Neal Aug 29 '16 at 19:03 |
| Does this mean I'm going to have two copies of the same file in my js folder i.e. one for 6 and one for 5.1? I found typescript annoying because I would have three files / typescript file. A project with 100 typescripts files would have 300 files that a person would need to filter through. – nu everest Aug 29 '16 at 20:58 |
show 2 more comments |