You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a file located in the root folder begins with a ., the resolver will not be able to locate it.
In my root folder (configured as './src'), I've got a file used for package configuration. In my case, the file is named .mvomrc.json, but the file name and extension both appear to be irrelevant to this issue in my testing. The only thing that appears to matter is that the file begins with a . and is located directly in the configured root folder.
The file can be imported using relative pathing both from within the directory as well as below it (i.e. ./.mvomrc.json or ../.mvomrc.json. It can be imported if the file is moved to a directory below the root (i.e. import stuff from 'subdirectory/.mvomrc.json'. I believe that when relative pathing is used then the module-resolver ignores it, which I also suspect might be the origin of my problem.
...it appears to me that the module-resolver is not processing any file that begins with .. My guess is that the intention here is to throw out anything it believes to have a relative path, but that also throws out files which happen to begin with a . but are not intended to be a relative path.
I think this explains the issue relatively well, but I can whip up a test scenario if needed.
Thanks!
The text was updated successfully, but these errors were encountered:
If a file located in the root folder begins with a
.
, the resolver will not be able to locate it.In my root folder (configured as
'./src'
), I've got a file used for package configuration. In my case, the file is named.mvomrc.json
, but the file name and extension both appear to be irrelevant to this issue in my testing. The only thing that appears to matter is that the file begins with a.
and is located directly in the configured root folder.The file can be imported using relative pathing both from within the directory as well as below it (i.e.
./.mvomrc.json
or../.mvomrc.json
. It can be imported if the file is moved to a directory below the root (i.e.import stuff from 'subdirectory/.mvomrc.json'
. I believe that when relative pathing is used then the module-resolver ignores it, which I also suspect might be the origin of my problem.In the below code from
resolvePath.js
......it appears to me that the module-resolver is not processing any file that begins with
.
. My guess is that the intention here is to throw out anything it believes to have a relative path, but that also throws out files which happen to begin with a.
but are not intended to be a relative path.I think this explains the issue relatively well, but I can whip up a test scenario if needed.
Thanks!
The text was updated successfully, but these errors were encountered: