パッケージの詳細

rollup-plugin-subpath-externals

evocateur37ISC3.4.0

Externalize all dependencies, even subpath imports

rollup, plugin, subpath, externals

readme

rollup-plugin-subpath-externals

Externalize all dependencies, even subpath imports

Usage

Use this plugin in your rollup.config.js to externalize all dependencies, even subpath imports (lodash, babel-runtime) and peerDependencies.

const subpathExternals = require('rollup-plugin-subpath-externals');
const pkg = require('./package.json');

module.exports = {
    plugins: [
        subpathExternals(pkg)
    ]
};

Note: This package requires node >=8.9.

Options

To express more fine-grained control over what dependencies are externalized, you may pass package props under the rollup namespace:

Explicit External

Only module names passed to rollup.external (and builtin modules) will be externalized, all others will be inlined.

{
    "rollup": {
        "external": ["lodash"]
    }
}

Partial Bundling

Any dependency names passed to rollup.bundle will always be inlined, not externalized.

{
    "rollup": {
        "bundle": ["three"]
    }
}

rollup.bundle is processed after rollup.external, and thus any duplicates between the two collections will always be inlined.

Related

Check the Pectin project docs for more information.

更新履歴

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.4.0 (2019-08-01)

Features

  • deps: Upgrade dependencies (923f92f)

3.0.0 (2019-01-01)

Features

BREAKING CHANGES

  • Rollup 0.x is no longer supported.

2.4.1 (2018-11-15)

Note: Version bump only for package rollup-plugin-subpath-externals

2.4.0 (2018-11-14)

Features

  • subpath-externals: Accept package props for fine-grained control (b4f134b)

2.1.0 (2018-10-16)

Features

  • subpath-externals: Accept optional format config that controls which types of dependencies are externalized (446440d)

2.0.0 (2018-10-10)

Note: Version bump only for package rollup-plugin-subpath-externals

1.0.0 (2018-08-31)

Features