# holocron-module-register-webpack-plugin

> This plugin adds the module to the registry once its loaded on the page.

Latest version **2.2.0** (published 2024-02-21) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install holocron-module-register-webpack-plugin
pnpm add holocron-module-register-webpack-plugin
yarn add holocron-module-register-webpack-plugin
bun add holocron-module-register-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2024-02-21 |
| First published | 2019-12-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Maintainers | amexopensource, 10xlacroixdrinker |
| Keywords | holocron, amex, one-app |

## Links

- npm: https://www.npmjs.com/package/holocron-module-register-webpack-plugin
- Repository: https://github.com/americanexpress/holocron
- Issues: https://github.com/americanexpress/holocron/issues
- npm.io page: https://npm.io/package/holocron-module-register-webpack-plugin

## Recent versions

- 2.2.0 (latest) — 2024-02-21
- 2.1.2-alpha.10 (alpha) — 2024-02-15
- 2.1.1 — 2023-11-08
- 2.1.0 — 2023-10-25
- 2.0.0-alpha-004.0 — 2023-09-19
- 1.8.0 — 2023-08-18
- 1.4.0 — 2023-02-15
- 1.2.3 — 2022-04-13
- 1.2.2 — 2022-04-11
- 1.2.1 — 2022-02-11
- 1.2.0 — 2021-12-16
- 1.1.4 — 2021-01-27
- 1.1.3 — 2021-01-21
- 1.1.2 — 2020-10-01
- 1.1.1 — 2020-09-16
- … 2 more at https://npm.io/package/holocron-module-register-webpack-plugin/versions

## README

<h1 align="center">
  <img src='https://github.com/americanexpress/holocron/raw/main/packages/holocron-module-register-webpack-plugin/holocron-module-register-webpack-plugin.png' alt="Holocron Module Register Webpack Plugin - One Amex" width='50%'/>
</h1>

[![npm](https://img.shields.io/npm/v/holocron-module-register-webpack-plugin)](https://www.npmjs.com/package/holocron-module-register-webpack-plugin)

>This plugin adds the module to the registry once its loaded on the page.
>It wraps the contents of a module in an [IIFE](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) which registers the module.

## 📖 Table of Contents

* [Usage](#-usage)

## 🤹‍ Usage

### Installation

```bash
yarn add holocron-module-register-webpack-plugin --dev

# or

npm install holocron-module-register-webpack-plugin --save-dev
```

### Configurations

Add the plugin to your webpack config

``` javascript

const HolocronModuleRegisterPlugin = require('holocron-module-register-webpack-plugin');
```

Pass the name of the module to the plugin as a parameter within your webpack configuration.

```javascript
const HolocronModuleRegisterPlugin = require('holocron-module-register-webpack-plugin');
const pkg = require('./package.json');

const { name } = pkg;

const webpackOptions = {
  entry: path.join(fixturesPath, 'SomeModule.js'),
  output: {
    path: buildPath,
  },
  plugins: [new HolocronModuleRegisterPlugin('some-module')],
};
```

---
_Source: https://npm.io/package/holocron-module-register-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
