@sdinteractive/requirejs-export-plugin

3.0.0 • Public • Published

requirejs-export-plugin

Exports all imported modules to browser requirejs via window.define.

This is specifically useful for Magento 2, which extensively uses requirejs.

Currently, a prefix of mixins! is added, so this is only usable with Magento 2.

Usage

In webpack.config.js:

const RequireJsExportPlugin = require('@sdinteractive/requirejs-export-plugin');

module.exports = {
  plugins: [
    new RequireJsExportPlugin(),
  ],
};

In Magento 2, this makes it so that requirejs code can load webpack modules (such as for UI components, etc.)

This also generates stubs for requirejs-loader, to allow for proper sequencing of the export.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.0258latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.0258
2.0.10
2.0.00
1.2.00
1.1.10
1.1.00
1.0.00

Package Sidebar

Install

npm i @sdinteractive/requirejs-export-plugin

Weekly Downloads

204

Version

3.0.0

License

ISC

Unpacked Size

5.83 kB

Total Files

3

Last publish

Collaborators

  • mpchadwick
  • brianlabelle_rp
  • dborishansky
  • toddbc