vuex-guardian icon indicating copy to clipboard operation
vuex-guardian copied to clipboard

The import path should be relative.

Open kaznak opened this issue 5 years ago • 0 comments

The type declaration code Vue-guardian puts out causes trouble because of their absolute path in the import path placed on its head. The path of this line should be relative. Please consider this fix.

For example, in your example repository, takefumi-yoshii/vuex-guardian-example, the type declaration codes will be placed in types/vuex and begin with as follows:

import * as Module from "<the-absolute-path-in-which-this-repository-placed>/store/index";

This line causes trouble in two situations.

The first situation is when the repository is in a different path in which it placed when Vue-guardian runs before. This situation occurs when the user moves his repository to another path.

The second situation is when the user can designate the repository by multiple different paths. I met this situation while running Vue-guardian from the bash on Windows Subsystem for Linux and watching code from Visual Studio Code on Windows native system.

These situations also occur when the repository is in a shared directory like dropbox, and the mount path is different.

kaznak avatar Aug 03 '19 18:08 kaznak