Angular CLI 'ng serve' to ignore less and use available css

此生再无相见时 提交于 2019-12-07 07:38:25

I manage to do that by uninstalling less module from project using 'npm uninstall less --save-dev'

Now I can use relative path for less import and also intellisense is working now.

When you generate a new project using angular cli, type a command like below:

ng new new-project --style less

It will setup your project using less. When you serve(run) the project each time, angular cli will automatically compile your less files.

According to ng command manual

ng new <options...>

--style (String) (Default: css)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!