External Require Webpack Plugin
A webpack plugin to expose modules so that user could require them externally.
Installation
Prerequisites: Node.js (>=4.x), npm version 2+.
npm install --save-dev external-requires-webpack-plugin
Basic Usage
var ExternalRequiresPlugin = require('external-requires-webpack-plugin');
var keys = require('lodash/keys');
var VENDORS = keys(packageJson.dependencies);
// ...
plugins: [
new ExternalRequiresPlugin({
vendor: VENDORS,
moduleA: ['pathA', 'pathB'],
...
})
]
// ...
Contributing
Please read our contributing guide for details on how to contribute to our project.