webpack provides an advanced mechanism to resolve files. The less-loader applies a Less plugin that passes all queries to the webpack resolver. Thus you can import your Less modules from node_modules. Just prepend them with a ~ which tells webpack to look up the modules.
在webpack中配置别名, 在vue模板中@import报错
@import '~@/components/PublicList/style.less';
看了官方文档和参考文档也没有明白是怎么回事,上面代码就是可以在一个less文件中引用另一个less文件。
版权声明:本文为sansan_7957原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。