import-map-externals-webpack-plugin
v1.0.0
Published
Wepback plugin to auto-externalize dependencies available in import-maps
Downloads
33,057
Readme
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