single-spa / create-single-spa

https://single-spa.js.org/docs/create-single-spa
Other
128 stars 60 forks source link

Implement generator for shared dependencies #23

Closed joeldenning closed 4 years ago

filoxo commented 4 years ago

Using the react-microfrontends org as an example, do the generated files look like the shared-dependencies repo or like the styleguide repo instead?

joeldenning commented 4 years ago

shared-dependencies repo. The generator would simply create an shared.importmap file (.importmap file extension is what we should move towards).

The content of the import map should be something like this:

{
  "imports": {
    "single-spa": "https://cdn.jsdelivr.net/npm/single-spa@5.3.1/lib/system/single-spa.min.js"
  }
}
mellis481 commented 4 years ago

Looks like that CDN URL is no longer valid. Is this the correct one? https://cdn.jsdelivr.net/npm/single-spa@5.3.1/lib/umd/single-spa.min.js

filoxo commented 4 years ago

The system build would be better with the recommended setup, but yea, it appears that one of the intermediary folders was missing from the URL.

https://cdn.jsdelivr.net/npm/single-spa@5.3.1/lib/system/single-spa.min.js

joeldenning commented 4 years ago

Good catch - updated my comment