https://github.com/single-spa/import-map-externals-webpack-plugin
A plugin that auto-externalizes dependencies that are available in an import map
https://github.com/single-spa/import-map-externals-webpack-plugin
Last synced: 12 months ago
JSON representation
A plugin that auto-externalizes dependencies that are available in an import map
- Host: GitHub
- URL: https://github.com/single-spa/import-map-externals-webpack-plugin
- Owner: single-spa
- License: mit
- Created: 2024-09-30T02:41:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-19T20:26:01.000Z (about 1 year ago)
- Last Synced: 2025-06-19T21:28:39.990Z (about 1 year ago)
- Language: TypeScript
- Size: 25.4 KB
- Stars: 1
- 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-externals-webpack-plugin
A plugin that auto-externalizes dependencies that are available in an import map.
## Installation
```sh
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
```js
// 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