# parcel-plugin-html-externals

> ParcelJS plugin to ignore certain script and stylesheet link tags in html files marked as externals

Latest version **0.3.0** (published 2021-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install parcel-plugin-html-externals
pnpm add parcel-plugin-html-externals
yarn add parcel-plugin-html-externals
bun add parcel-plugin-html-externals
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2021-05-07 |
| First published | 2019-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | stoically |
| Maintainers | stoically |

## Links

- npm: https://www.npmjs.com/package/parcel-plugin-html-externals
- Repository: https://github.com/stoically/parcel-plugin-html-externals
- Homepage: https://github.com/stoically/parcel-plugin-html-externals#readme
- Issues: https://github.com/stoically/parcel-plugin-html-externals/issues
- npm.io page: https://npm.io/package/parcel-plugin-html-externals

## Dependencies (1)

- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4

## Recent versions

- 0.3.0 (latest) — 2021-05-07
- 0.2.0 — 2020-03-13
- 0.1.2 — 2019-07-11
- 0.1.1 — 2019-07-11
- 0.1.0 — 2019-07-10

## README

ParcelJS plugin to ignore certain script and stylesheet link tags in html files marked as externals.

> Parcel will probably support externals out of the box in the future, [related issue here](https://github.com/parcel-bundler/parcel/issues/144).
>
> If you're looking for a way to declare externals instead of ignoring them, you might want to check out [parcel-plugin-externals](https://github.com/FlorianRappl/parcel-plugin-externals)

### Install

```
npm install --save-dev parcel-plugin-html-externals
```

### Usage

Put an `externals` key into your `package.json`, e.g.

```json
{
  "externals": {
    "vendor/**/*": false
  }
}
```

will ignore all script / stylesheet link tags whose src / href attribute starts with `vendor/`, e.g

```html
<script src="vendor/thirdparty.min.js"></script>
```

The externals key can be a string or any glob accepted by [minimatch](https://github.com/isaacs/minimatch),
the value must be `false` to trigger ignoring.


### Caveats

The plugin monkey patches Parcel internals by extending the HTMLAsset class and proxying its ast walker, so it might just break in an upcoming version.


### License

MIT

---
_Source: https://npm.io/package/parcel-plugin-html-externals · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
