umd-require-webpack-plugin

0.0.1 • Public • Published

This plugin allows webpack to correctly parse and handle the dependencies of a piece of code in the following format, which would usually fail due to require being redefined in the factory function parameters.

(function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        /* AMD. Register as an anonymous module. */
        define(['require', 'exports'], factory);
    } else if (typeof exports === 'object') {
        /* CommonJS */
        factory(require, exports);
    } else {
        /* Browser globals - dangerous */
        factory(function(moduleName) { return root[moduleName]; }, root);
    }
}(this, function (require, exports) {
    var _ = require("lodash");
}))

/umd-require-webpack-plugin/

    Package Sidebar

    Install

    npm i umd-require-webpack-plugin

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • page