在一个 less 文件中引用另一个 less 文件

less-loader

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文件。

你可能感兴趣的:(Less)