single-spa / single-spa-playground

A website that helps you set up single-spa
http://single-spa-playground.org
MIT License
39 stars 10 forks source link

Single-spa application development guide? #36

Closed Zhwt closed 3 years ago

Zhwt commented 3 years ago

Hi,

I've read the documents and didn't find much information about how to develop a single-spa application. I've followed the create-single-spa tutorial in the doc but I think I didn't get the point about how to develop the application.

Let's say I have one root project which is cloned from root-config. After I use create-single-spa --framework vue and initialized one Vue project, running npm run serve then visit http://localhost:8080/ gives me a blank page with the following error:

Uncaught Error: systemjs-webpack-interop: There is no such module '@org/project' in the SystemJS registry. Did you misspell the name of your module?

I believe that there are some register steps are missing but should it happen in the module application? And the application works fine if I register it in the root-config project. But it became a bit cumbersome when developing multiple apps within one root project, so currently I'm using the URL given by create-single-spa command to debug my application.

So I'm wondering is there something that I'm missing so that I can test multiple application at once without multiple root-config project, or how to debug them by accessing http://localhost:8080 or something similar.

Thanks in advance!

Zhwt commented 3 years ago

Never mind, I just forgot import mapping. coexisting-vue-microfrontends#local-development