https://github.com/single-spa/import-map-microfrontend-deps
Simplified import map dependency management
https://github.com/single-spa/import-map-microfrontend-deps
Last synced: over 1 year ago
JSON representation
Simplified import map dependency management
- Host: GitHub
- URL: https://github.com/single-spa/import-map-microfrontend-deps
- Owner: single-spa
- License: mit
- Created: 2024-10-15T02:52:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T03:05:55.000Z (over 1 year ago)
- Last Synced: 2025-02-15T07:46:53.305Z (over 1 year ago)
- Language: TypeScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# import-map-microfrontend-deps
Simplified dependency management for microfrontends
## Installation
```sh
npm i @single-spa/import-map-microfrontend-deps
```
## Usage
```ts
import { buildImportMapDependencies } from "@single-spa/import-map-microfrontend-deps";
import { ImportMapMicrofrontendUtils } from "@single-spa/import-map-microfrontend-utils";
await buildImportMapDependencies({
template: {
imports: {
react: "18.3.0",
"react-dom": "18.3.0",
},
scopes: {},
},
outputFolder: "dist",
utils: new ImportMapMicrofrontendUtils({
baseOrigin: "https://cdn.example.com",
}),
});
```