docs: function compileMPScript(script, mpOptioins, moduleId) {
      const babelrc = getBabelrc(mpOptioins.globalBabelrc);
      let result, metadata;
      let scriptContent = script.content;
      const babelOptions = { extends: babelrc, plugins: [parseComponentsDeps] };
      if (script.src) {
          // 处理src
          const scriptpath = path.join(path.dirname(this.resourcePath), script.src);
          scriptContent = fs.readFileSync(scriptpath).toString();
      }
      if (script.lang === 'ts') {
          // 处理ts
          metadata = parseComponentsDepsTs(scriptContent);
      } else {
          result = babel.transform(scriptContent, babelOptions);
          metadata = result.metadata;
      }
  
      // metadata: importsMap, components
      const { importsMap, components: originComponents } = metadata;
  
      // 处理子组件的信息
      const components = {};
      const fileInfo = resolveTarget(this.resourcePath, this.options.entry);
      if (originComponents) {
          resolveSrc(originComponents, components, this.resolve, this.context)
              .then(() => {
                  resolveComponent(this.resourcePath, fileInfo, importsMap, components, moduleId);
              })
              .catch(err => {
                  console.error(err);
                  resolveComponent(this.resourcePath, fileInfo, importsMap, components, moduleId);
              });
      } else {
          resolveComponent(this.resourcePath, fileInfo, importsMap, components, moduleId);
      }
  
      return script;
  }