joeldenning / coexisting-vue-microfrontends

A repo showing separate vue apps coexisting as microfrontends with single-spa
http://coexisting-vue-microfrontends.surge.sh/
MIT License
615 stars 143 forks source link

Issues with vue cli v4.x.x still happen #38

Closed tvmota closed 4 years ago

tvmota commented 4 years ago

vue-cli version

vue_version

Project options

vue_create_options

Vue config

vue_config_js

Console log errors

console_app3

I've cloned the coexisting-vue-microfrontends project, and created a new "module" (app3) with vue-cli v4.x.x, got the settings recommended in the issues here and the application does not render the new module. can you help me? Follow the forked project: https://github.com/tvmota/coexisting-vue-microfrontends

Thank very much.

joeldenning commented 4 years ago

FYI, in the next week or so, I'm going to be archiving this repository in favor of the newer and better example at https://github.com/vue-microfrontends/. This will be part of the single-spa@5 release that is forthcoming.

Regarding the error you're experiencing, it is likely not related to vue cli 4. All of the applications in this repo also use vue cli 4.

I don't have the time right now to pull down your repo and debug it. The error indicates that the loading function for app3 is resolving with the webpackJsonp global variable array, instead of with the actual application. Webpack uses webpackJsonp as a way of doing code splits - it might have something to do with that.

tvmota commented 4 years ago

I've solved the problem by disabling code spliting, in vue.config.js:

config.optimization.delete('splitChunks') image Forked Repository link Thanks man.