$ npm install rollup-plugin-internal
Rollup plugin to explicitly mark dependencies as internal.
yarn add -D rollup-plugin-internal
rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import autoExternal from 'rollup-plugin-auto-external';
import internal from 'rollup-plugin-internal';
export default {
input: 'index.js',
plugins: [
resolve(),
commonjs(),
autoExternal(),
// should be the last plugin
internal(['react', 'react-dom']),
],
};
modules
: string[]
— Array of modules to mark as internal.© 2010 - cnpmjs.org x YWFE | Home | YWFE