webpack-pnp-unplugged-externals

1.0.0 • Public • Published

webpack Plug'n'Play unplugged externals

Exclude unplugged PnP packages from the webpack bundle

Install

yarn add --dev webpack-pnp-unplugged-externals

Usage

webpack.config.js

const pnpUnpluggedExternals = require('webapck-pnp-unplugged-externals');
 
module.exports = {
  // ...
  externals: [pnpUnpluggedExternals()],
};

To explicitly declare a package as external, simply yarn unplug it from the workspace! (or just add it to the webpack externals array, like usual.)

It's recommended to use this library in conjunction with pnp-package-json-webpack-plugin. Together, it's possible to create a minimal package.json containing only dependencies that webpack normally can't handle, e.g. packages that compile native addons, regardless of where they appear in your dependency tree.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    8

Package Sidebar

Install

npm i webpack-pnp-unplugged-externals

Weekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

3.52 kB

Total Files

4

Last publish

Collaborators

  • kherock