mrcrowl / vscode-easy-less

Easy LESS extension for Visual Studio Code
MIT License
68 stars 22 forks source link

@import unable to resolve less files in node_modules folder #91

Open devuxer opened 2 years ago

devuxer commented 2 years ago

Expected behavior

@import "antd/dist/antd.less"; automatically searches in /node_modules/antd/

Actual behavior

@import "antd/dist/antd.less"; throws the following error and no css file is generated on save:

'antd/dist/antd.less' wasn't found. Tried - c:\Users\Dan\Website\src\front-end\styles\antd\dist\antd.less,npm://antd\dist\antd.less,antd\dist\antd.less

Details

aceHubert commented 1 year ago

less compile use require.resolve to get package from node_modules but extension use inside less package that only can get from extension's node_modules directory,the way to @import from node_modules is using local less compile from workspace