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

How to fill in the imports in the import map #34

Closed xuoutput closed 3 years ago

xuoutput commented 3 years ago

After npx create-single-spa

image

click http://single-spa-playground.org/playground/instant-test?name=@single-spa/add-react&url=8500

it is ok.

then I modify some code

image

alright image

But how should I pass this step.

image

what's meaning Download URL?

image

image

joeldenning commented 3 years ago

Hi @xuoutput, apologies for the slow response here. The following part of your screenshot looks weird, and potentially a bug in single-spa-playground:

image

The url in that import map should not point to single-spa-playground.org, but rather to localhost:8500

The next step I'd take to diagnose the issue is check the Network tab in your devtools for a request to localhost:8500. Is one of them failing? Is CORS failing? If you open up the URL in its own browser tab, does it show a javascript file?

Zhwt commented 3 years ago

@xuoutput Try replacing the //localhost:8500/... part in the Download URL field with //127.0.0.1:8500/... then refresh the playground page. I also experienced this problem with Firefox, it will send request to https://localhost then fail with no reason no matter the cert is correct or not.