code: function load(componentPath, tagName, options = {}) {
    if (typeof tagName === 'object') {
      options = tagName
      tagName = ''
    }
  
    if (typeof componentPath === 'string') {
      options = Object.assign({
        compiler: 'official', // official - 官方编译器、simulate - 纯 js 实现的模拟编译器
        rootPath: path.dirname(componentPath), // 项目根路径
      }, options)
    } else {
      options = Object.assign({
        compiler: 'simulate',
        rootPath: '',
      }, options)
    }
  
    const cache = {
      wxss: [],
      options,
    }
    const id = register(componentPath, tagName, cache)
  
    // 存入缓存
    componentMap[id] = cache
  
    return id
  }
docs: 加载自定义组件