I judge which vue component needs to be introduced according to the parameters passed to me by the backend, that is, I won"t know which vue file I need and load it until webpack has been packaged. The problem now is.
I used Vue.component (this.style, () = > import (`themes/$ {this.style} .vue`))
this.style is the parameter passed from the backend. After I do this, webpack will package all the vue files under my themes folder into a file, for example, now there are a.vue
and b.vue
under the themes folder, and the code of these two vue files is included in the js file generated on the packaged page, but my this.style
parameter is a.vue at this time.
so how can you package only the vue file that my dynamic parameters passed?