joeldenning / vite-single-spa-example

MIT License
63 stars 25 forks source link

vite +vue3 Error #3

Closed patrick-Xu closed 3 years ago

patrick-Xu commented 3 years ago

Can I have the example code for configuration property of parent applcation ? My console information is following uncaught TypeError: application 'app1' died in status LOADING_SOURCE_CODE: Cannot convert undefined or null to object image

joeldenning commented 3 years ago

Sure, you'll need to use import(/* webpackIgnore: true */ 'http://localhost:3000/src/main.js') rather than System.import().

I created https://github.com/joeldenning/vite-single-spa-root-config which shows this, and also added this documentation explaining it a bit.

I also upgraded this example to use Vite 2