webpack-expose-plugin

1.0.3 • Public • Published

webpack-expose-plugin

将 webpack 打包的 modules 暴露到 window 上,供浏览器端 script 使用。

Installation

$ yarn add webpack-expose-plugin --dev

Using

import WebpackExposePlugin from 'webpack-expose-plugin';

export default {
    // ...
    plugins: [
        new WebpackExposePlugin({
            React: require.resolve('react'),
            ReactDOM: require.resolve('react-dom')
        }),
    ]
    // ...
};

License

MIT

/webpack-expose-plugin/

    Package Sidebar

    Install

    npm i webpack-expose-plugin

    Weekly Downloads

    275

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    119 kB

    Total Files

    11

    Last publish

    Collaborators

    • chenhebing