WebStorm ECMAScript 6 and import aliases

Hello everyone

I am using emberjs which is ECMA Script 6 based framework . Our imports are kind virtual it means files are not available on specified file location until build time.

Consider following import, which points to files which are available only somewhere in node_modules dir and are packed to project when built.

import { defineError, BaseError } from 'ember-utils/utils/syntaxsugar/error';


Is there any annotation or something similar to tell IDE where the files actually are. e.g

  /* @location ./../node_modules/ember-utils/lib/utils/syntaxsugar/error.js */  
import { defineError, BaseError } from 'ember-utils/utils/syntaxsugar/error';
0
2 comments

No, there is no way to do this. Please feel free to log a request for this feature to youtrack


0

Is there a way to add this information programmatically? I'm maintaining the Ember.js plugin for IntelliJ and I'd be happy to implement something like this if you point me in the right direction.

0

Please sign in to leave a comment.