How to use Tencent Map plug-in in mpvue

introduce Tencent Map plug-in into mpvue, no error reported and no map displayed.

app.json

"plugins": {
        "mapPlugin": {
            "version": "1.0.6",
            "provider": "wx5bc2ac602a747594"
        }
    }

main.js of map.vue sibling

import Vue from "vue"
import App from "./index"
const app = new Vue(App)
app.$mount()

export default {
    config: {
        navigationBarTitleText: "",
        usingComponents: {
            "map-route": "plugin://mapPlugin/mapRoute"
        }
    }
};

map.vue

 <!---->
    <map-route :route-info="routeInfo"></map-route>
    
    <script>
//js 
let plugin = requirePlugin("mapPlugin")
export default {
  data () {
    return {
      msg: "map",
      ak: "AQbnj0CLeEwawuI9Ep6PxcoXgzwPPmMr",
      routeInfo: {}
    }
  },

  components: {
    
  },

  methods: {
    
  },
mounted(){
      //js 
// let mapInfo = this.$store.state.addressInfo;
// console.log(JSON.stringify(mapInfo))
let routeInfo = {
    startLat: 39.90469,    // 
    startLng: 116.40717,    // 
    startName: "",   //  
    endLat: 39.94055,    // 
    endLng :116.43207,  // 
    endName:"",  // 
    mode: "car"  // 
};
this.routeInfo = routeInfo;

    },
}
</script>
Jun.11,2022

put the map SDK under static, don't let it be compiled by webpack, and you won't get an error

.

moved from https://github.com/Meituan-Di... thanks to the author


excuse me, has this problem been solved

Menu