P
P
Pavel Belousov2018-09-14 16:54:49
JavaScript
Pavel Belousov, 2018-09-14 16:54:49

How to teach WebStorm to see "wrong" imports?

I am using babel-plugin-transform-es2015-modules-simple-amd which transforms the view code

import x from '/path/to/x';
import y from '/path/to/y';
doSomething();
export default x + y;

in
define(['/path/to/x', '/path/to/y'], function (x, y) {
  doSomething();
  return x + y;
});

It has to be so, it has developed for historical reasons, and it is impossible to remake it in the near future.
However, I really want to go to the dependency file by ctrl + click, and this task seems to be non-trivial.
I posted a simple example: https://github.com/pafnuty/ws-alias-problem
Perhaps someone faced a similar task?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question