Auto-Import icon indicating copy to clipboard operation
Auto-Import copied to clipboard

Import path contains redundant parts, as well as incorrect slashes

Open larrifax opened this issue 9 years ago • 3 comments

When auto-importing a class from a file in a sibling directory, the resulting import statement looks like this: import { RequestActions } from ".\..\actions\request.actions";

The leading .\ in the import path is redundant and could be removed. Also, the path consists of backslashes instead of forward slashes.

I'm using 0.8.0 on a Windows system.

larrifax avatar Aug 16 '16 09:08 larrifax

Similar backslash issue here - running Windows.

johne2310 avatar Aug 20 '16 22:08 johne2310

Hey guys, could you try updating your plugin to 0.8.1.. hopefully this should FINALY fix this :)

Btw, the code is now fully in Github.. any pull requests are welcome!

soates avatar Aug 22 '16 08:08 soates

Thank. Install 0.8.1 - the slashes are not importing correctly on Windows.

There is still the extraneous ./ at the start of the path:

e.g. importing as import { SignupPage } from './../signup/signup'; rather than import { SignupPage } from '../signup/signup';

johne2310 avatar Aug 22 '16 11:08 johne2310