# rollup-external-modules

> Mark all modules located in node_modules as external

Latest version **2.0.0** (published 2019-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-external-modules
pnpm add rollup-external-modules
yarn add rollup-external-modules
bun add rollup-external-modules
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-02-01 |
| First published | 2019-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Richard Samuelsson |
| Maintainers | ricsam |
| Keywords | rollup, externals |

## Links

- npm: https://www.npmjs.com/package/rollup-external-modules
- Repository: https://github.com/ricsam/rollup-external-modules
- Homepage: https://github.com/ricsam/rollup-external-modules#readme
- Issues: https://github.com/ricsam/rollup-external-modules/issues
- npm.io page: https://npm.io/package/rollup-external-modules

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-02-01
- 1.0.0 — 2019-02-01

## README

# rollup-external-modules

![NPM version](https://img.shields.io/npm/v/rollup-external-modules.svg?style=flat)
[![Build Status](https://travis-ci.org/ricsam/rollup-external-modules.svg?branch=master)](https://travis-ci.org/ricsam/rollup-external-modules)
[![Coverage Status](https://coveralls.io/repos/github/ricsam/rollup-external-modules/badge.svg?branch=master)](https://coveralls.io/github/ricsam/rollup-external-modules?branch=master)

Mark all modules located in node_modules as external.

### Installation

```bash
npm install --save-dev rollup-external-modules
# or 
yarn add -D rollup-external-modules
```

### Usage

```js
// rollup.config.js
import rollupExternalModules from 'rollup-external-modules';

export default {
  input: 'entry.js',
  output: {
    file: 'dist/index.js',
    format: 'cjs',
  },
  external: rollupExternalModules,
};
```

### NPM scripts

 - `npm t`: Run test suite
 - `npm start`: Run `npm run build` in watch mode
 - `npm run test:watch`: Run test suite in [interactive watch mode](http://facebook.github.io/jest/docs/cli.html#watch)
 - `npm run test:prod`: Run linting and generate coverage
 - `npm run build`: Generate bundles and typings, create docs
 - `npm run lint`: Lints code
 - `npm run commit`: Commit using conventional commit style ([husky](https://github.com/typicode/husky) will tell you to use it if you haven't :wink:)


### Automatic releases

_**Prerequisites**: you need to create/login accounts and add your project to:_
 - [npm](https://www.npmjs.com/)
 - [Travis CI](https://travis-ci.org)
 - [Coveralls](https://coveralls.io)

_**Prerequisite for Windows**: Semantic-release uses
**[node-gyp](https://github.com/nodejs/node-gyp)** so you will need to
install
[Microsoft's windows-build-tools](https://github.com/felixrieseberg/windows-build-tools)
using this command:_

```bash
npm install --global --production windows-build-tools
```

#### Setup steps

Follow the console instructions to install semantic release and run it (answer NO to "Do you want a `.travis.yml` file with semantic-release setup?").

_Note: make sure you've setup `repository.url` in your `package.json` file_

```bash
npm install -g semantic-release-cli
semantic-release-cli setup
# IMPORTANT!! Answer NO to "Do you want a `.travis.yml` file with semantic-release setup?" question. It is already prepared for you :P
```

From now on, you'll need to use `npm run commit`, which is a convenient way to create conventional commits.

Automatic releases are possible thanks to [semantic release](https://github.com/semantic-release/semantic-release), which publishes your code automatically on [github](https://github.com/) and [npm](https://www.npmjs.com/), plus generates automatically a changelog. This setup is highly influenced by [Kent C. Dodds course on egghead.io](https://egghead.io/courses/how-to-write-an-open-source-javascript-library)

---
_Source: https://npm.io/package/rollup-external-modules · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
