less.js
less.js copied to clipboard
Can't use package.json property `imports` to import subpath module.
My package.json :
{
...,
"imports": {
"#style/*": "./src/style/*"
}
...
}
when i use less-loader to load less file like:
@import (refrence) "#style/mixins"
i got error like:
'#style/mixins' wasn't found. Tried - .less
Error in D:\Development\xxx\index.module.less (line 2, column 0)
I think less throws an error before using the FileManager to resolve the file, making it impossible to use the webpack resolver to resolve the real path.
When I change the code to the following, everything works fine:
@import (refrence) "~#style/mixins"
My packages version is:
Hello , I am new to open source , I want to work on this issue can you please guide me on how I can get started?
@RUSHIM24 If you want to take a look, great! You'd probably want to look at tracing the code here: https://github.com/less/less.js/blob/master/packages/less/src/less-node/file-manager.js#L62
Hello , I found the bug and made the changes in local repository as well as when I ran the test , all test worked fine, My question is, how do I ensure that the error : #style/mixins' wasn't found , is resolved or not?
@matthew-dean can I be assigned this issue?