1.0.0 • Published 9 months ago

import-map-externals-webpack-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

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
1.0.0

9 months ago