# Third-party framework compatibility issues

# Automatic Compatibility Processing Instructions

  • To help developers quickly complete third-party framework compatibility to successfully complete the compilation of Mini Programs into multi-terminal applications for testing, Developer Tools has supported the detection of suspected use and Donut Multi-terminal frameworks Automatic compatibility processing after third-party frameworks with compatibility issues

  • The current developer tools are useful forThird-party frameworks that have compatibility issues with the Mini Program multiterminal frameworkThe specific implementation of the compatibility treatment is: vendor.js in Add new character string "miniapp," and the following prompt appears to inform the developer which files have been modified by this processing, and the developer tool will also modify the previous vendor.js Make backups easy for developers to restore

  • In addition, developers can go todetails - Local settingsUncheck the Third Party Framework Automatic Compatibility Processing

# app.json & project.miniapp.json compatible

# Problem description

Some developers based on third-party framework development projects (hereinafter referred to as the source project), after generating WeChat Mini Program and upgrading to multi-terminal applications, the following problems may be encountered when using third-party frameworks to compile again:

  • In the source project WeChat Mini Program product directory, apagejson Part of the file is deleted, for example: miniApageuseAuthorizePage

  • In the source project WeChat Mini Program product directory, project.miniapagejson File deleted

# Solutions

  • Operation flow

    • Note: Please use the latest Nightly Edition developer tools do the following WeChat developer tool download address

    • WeChat developer tools to open source project generated Mini Program products -> Upgrade to a multi-tier application (make sure you check for third-party frameworks) -> The replication tool generates project.miniapp.json To any directory (recommended for placement in the source project's src Under the Directory)

    • With arbitrary IDE Open source projects -> open src Under the directory manifest.json file -> in "mp-weixin" of "setting" Add the following parameters

      /* manifest.json */
      
      "mp-weixin":  {
          "setting": {
              /* Add the following parameters to restore the app.json Parts of the file */
              "useMiniAppAuthorizePage": true,
              /* Add the following parameters to restore the project.miniapp.json file */
              "copyMiniAppJsonPath": "../../../src/project.miniapp.json"
              /* Note: This path is relative to the Mini Program source package under project.config.json Please calculate the level according to your own project, the above example is three levels */
          }
      }
      
    • Open the Mini Program project again with WeChat developer tool (multi-terminal application mode), and the deleted content/Files will be restored automatically

  • Dxplaination of parameters

    parameter Required type Example value Introductions
    useMiniAppAuthorizePage no boolean true Access Mini Program Authorization Page (Identity Management Services)Note: This setting overrides app.json In UseAuthorizePage, because both serve the same purpose
    copyMiniAppJsonPath yes string "../../../src/project.miniapp .json" project.miniapp .json The specific path to where the file is stored

# Supplementary note

  • For the compatibility of third-party frameworks, if not handled, the Mini Program compiled for multi-terminal applications after its performance as a white screen, affecting the normal use of developers multi-terminal applications

  • Not all Mini Programs developed by third-party frameworks are compatible with multiterminal applications. Developer tools here is only to deal with developer feedback more problems of a third-party framework compatibility issues, such as the emergence of new compatibility issues and developer tools have not yet been compatible to deal with, you can contactMultiterminal application assistantGive feedback