# gatsby-plugin-external-css

> Add external custom css files to your generated html pages

Latest version **1.0.1** (published 2021-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-plugin-external-css
pnpm add gatsby-plugin-external-css
yarn add gatsby-plugin-external-css
bun add gatsby-plugin-external-css
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-07-16 |
| First published | 2021-06-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 45.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | fr073n |
| Maintainers | fr073n |
| Keywords | gatsby, gatsby-plugin, plugin, script, css |

## Links

- npm: https://www.npmjs.com/package/gatsby-plugin-external-css
- Repository: https://github.com/snowpact/gatsby-plugin-external-css
- Issues: https://github.com/snowpact/gatsby-plugin-external-css/issues
- npm.io page: https://npm.io/package/gatsby-plugin-external-css

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.9.6

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-07-16
- 1.0.0 — 2021-06-10

## README

# gatsby-plugin-external-css

<a href="https://www.npmjs.com/package/gatsby-plugin-external-css">
<img src="https://img.shields.io/npm/v/gatsby-plugin-external-css.svg?style=popout" alt="Current npm package version" />
</a>
<a href="https://www.npmjs.com/package/gatsby-plugin-external-css">
<img src="https://img.shields.io/npm/dw/gatsby-plugin-external-css.svg?style=popout" alt="Downloads per month on npm." title="Downloads per month on npm." />
</a>


Add external custom css files to your generated html pages.

## Installation

```bash
npm install gatsby-plugin-external-css
```

or

```bash
yarn add gatsby-plugin-external-css
```

## Usage

This plugin lets you add a custom css file in your builded public index.html.
You probably don't need this as it's for very specific usage.

In my case, I'm generating different gatsby projects based on a config, and I'm providing a custom way to give a css file out of the src folder scope.

##### Add the following plugin to your `gatsby-config.js`

Create 

```js
// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-external-css',
      options: {
        source: 'full/local/path.css',
      },
    },
  ],
}
```
Be sure that the file exists.

The file will be copied into the final public file with a custom cache busting.
The css file will be appended at the last of the <head> meta.

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