Skip to content

A plugin that auto-externalizes dependencies that are available in an import map

License

Notifications You must be signed in to change notification settings

single-spa/import-map-externals-webpack-plugin

Repository files navigation

import-map-externals-webpack-plugin

A plugin that auto-externalizes dependencies that are available in an import map.

Installation

npm i -D import-map-externals-webpack-plugin

# or
pnpm i -D import-map-externals-webpack-plugin

# or
yarn add --dev import-map-externals-webpack-plugin

Usage

// webpack.config.js
const { ImportMapExternalsPlugin } = require('import-map-externals-webpack-plugin');

module.exports = {
  plugins: [
    new ImportMapExternalsPlugin({
      importMapUrl: "https://react.microfrontends.app/importmap.json"
    });
  ]
}

Options

The following options can be passed to the ImportMapExternalsPlugin constructor:

  • importMapUrl: a fully qualified, fetchable URL that contains valid import map json

About

A plugin that auto-externalizes dependencies that are available in an import map

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published