Path is undefined
Closed this issue · 1 comments
afkatja commented
When running the script, I get the following error:
return path[0] !== '.';
^
TypeError: Cannot read property '0' of undefined
The structure of my code:
| - src
| - | - book
| - | - | - components
So I run relative-to-alias --src ./src --alias SharedComponents --alias-path ./src/book/components
s-yadav commented
Added a path check on import and require syntax. This issue might be coming because of requirejs requires.
require(['some/path'], () => {});
The module should not update requirejs requires, that can be buggy.
Will mark this as fixed. Reopen with the case where this is breaking.