holocron-module-register-webpack-plugin

2.2.0 • Public • Published

Holocron Module Register Webpack Plugin - One Amex

npm

This plugin adds the module to the registry once its loaded on the page. It wraps the contents of a module in an IIFE which registers the module.

📖 Table of Contents

🤹‍ Usage

Installation

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

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

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

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')],
};

Readme

Keywords

Package Sidebar

Install

npm i holocron-module-register-webpack-plugin

Weekly Downloads

405

Version

2.2.0

License

Apache-2.0

Unpacked Size

22.4 kB

Total Files

5

Last publish

Collaborators

  • amexopensource
  • 10xlacroixdrinker