code: function combineWxml(root) {
      const names = [];
      let hasSlots = false;
      const findImports = code => {
          if (!code) {
              return;
          }
          const matches = code.match(/<import src="([a-z0-9$]+)"/gi);
          if (matches && Array.isArray(matches)) {
              matches.forEach(m => {
                  const name = m.match(/<import src="([a-z0-9$]+)"/i)[1];
                  if (name === 'slots') {
                      hasSlots = true;
                  }
                  if (name && name !== 'slots' && !names.indexOf(name) > -1) {
                      names.push(name);
                      findImports(emitQueue[name].importCode);
                  }
              });
          }
      };
      findImports(emitQueue[root].importCode);
  
      const tpls = Object.keys(emitQueue)
          .filter(k => !emitQueue[k].isRoot && names.indexOf(k) > -1)
          .reverse()
          .map(k => emitQueue[k])
          .reduce((prev, curr) => {
              return prev + curr.code + '\r\n';
          }, '');
  
      if (hasSlots) {
          const slots = getSlotsWithoutImports();
          return `<!-- slots -->\r\n${slots}\r\n<!-- templates -->\r\n${tpls}\r\n<!-- main -->\r\n${
              emitQueue[root].code
          }`;
      }
  
      return `<!-- templates -->\r\n${tpls}\r\n<!-- main -->\r\n${emitQueue[root].code}`;
  }
docs: 将入口组件以及其依赖的import template合并