多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## easycom 如果需要匹配node\_modules内的vue文件,需要使用`packageName/path/to/vue-file-$1.vue`形式的匹配规则,其中`packageName`为安装的包名,`/path/to/vue-file-$1.vue`为vue文件在包内的路径。 ``` "easycom": { "autoscan": true, "custom": { "^uni-(.*)": "@/components/uni-$1.vue", // 匹配components目录内的vue文件 "^vue-file-(.*)": "packageName/path/to/vue-file-$1.vue" // 匹配node_modules内的vue文件 } } ``` 注意: 1. easycom方式引入的组件无需在页面内import,也不需要在components内声明,即可在任意页面使用