Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 625 Bytes

README.md

File metadata and controls

30 lines (24 loc) · 625 Bytes

import-map-microfrontend-deps

Simplified dependency management for microfrontends

Installation

npm i @single-spa/import-map-microfrontend-deps

Usage

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",
  }),
});