# neutrino-middleware-style-loader

> Neutrino middleware for importing and loading stylesheets from modules

Latest version **7.4.0** (published 2017-12-04) · MPL-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install neutrino-middleware-style-loader
pnpm add neutrino-middleware-style-loader
yarn add neutrino-middleware-style-loader
bun add neutrino-middleware-style-loader
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 7.4.0 |
| Published | 2017-12-04 |
| First published | 2017-03-09 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3907 |
| Author | Eli Perelman |
| Maintainers | eliperelman |
| Keywords | neutrino, neutrino-middleware, style, css, stylesheet |

## Links

- npm: https://www.npmjs.com/package/neutrino-middleware-style-loader
- Repository: https://github.com/mozilla-neutrino/neutrino-dev/tree/master/packages/neutrino-middleware-style-loader
- Homepage: https://neutrino.js.org
- Issues: https://github.com/mozilla-neutrino/neutrino-dev/issues
- npm.io page: https://npm.io/package/neutrino-middleware-style-loader

## Dependencies (2)

- [css-loader](https://npm.io/package/css-loader.md) ^0.28.7
- [style-loader](https://npm.io/package/style-loader.md) ^0.18.2

## 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

- 7.4.0 (latest) — 2017-12-04
- 7.3.3 — 2017-11-21
- 7.3.2 — 2017-11-13
- 7.3.1 — 2017-11-06
- 7.3.0 — 2017-10-31
- 7.2.3 — 2017-10-26
- 7.2.1 — 2017-10-21
- 7.2.0 — 2017-10-21
- 7.1.10 — 2017-10-18
- 7.1.9 — 2017-10-18
- 7.1.8 — 2017-10-18
- 7.1.7 — 2017-10-18
- 7.1.6 — 2017-10-18
- 7.1.5 — 2017-10-18
- 7.1.4 — 2017-10-18
- … 37 more at https://npm.io/package/neutrino-middleware-style-loader/versions

## README

# Neutrino Style Loader Middleware

`neutrino-middleware-style-loader` is Neutrino middleware for loading and importing stylesheets from modules.

[![NPM version][npm-image]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
[![Join the Neutrino community on Spectrum][spectrum-image]][spectrum-url]

## Requirements

- Node.js v6.10+
- Yarn or npm client
- Neutrino v7

## Installation

`neutrino-middleware-style-loader` can be installed via the Yarn or npm clients.

#### Yarn

```bash
❯ yarn add neutrino-middleware-style-loader
```

#### npm

```bash
❯ npm install --save neutrino-middleware-style-loader
```

## Usage

`neutrino-middleware-style-loader` can be consumed from the Neutrino API, middleware, or presets. Require this package
and plug it into Neutrino:

```js
// Using function middleware format
const styles = require('neutrino-middleware-style-loader');

// Use with default options
neutrino.use(styles);

// Usage showing default options
neutrino.use(styles, {
  style: {},
  css: {}
});
```

```js
// Using object or array middleware format

// Use with default options
module.exports = {
  use: ['neutrino-middleware-style-loader']
};

// Usage showing default options
module.exports = {
  use: [
    ['neutrino-middleware-style-loader', {
      style: {},
      css: {}
    }]
  ]
};
```

- `style`: Set options for the style-loader used when loading CSS files.
- `css`: Set options for the css-loader used when loading CSS files.

## Customization

`neutrino-middleware-style-loader` creates some conventions to make overriding the configuration easier once you are
ready to make changes.

### Rules

The following is a list of rules and their identifiers which can be overridden:

| Name | Description | Environments and Commands |
| --- | --- | --- |
| `style` | Allows importing CSS stylesheets from modules. Contains two loaders named `style` and `css` which use `style-loader` and `css-loader`, respectively. | all |

## Contributing

This middleware is part of the [neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev) repository, a monorepo
containing all resources for developing Neutrino and its core presets and middleware. Follow the
[contributing guide](https://neutrino.js.org/contributing) for details.

[npm-image]: https://img.shields.io/npm/v/neutrino-middleware-style-loader.svg
[npm-downloads]: https://img.shields.io/npm/dt/neutrino-middleware-style-loader.svg
[npm-url]: https://npmjs.org/package/neutrino-middleware-style-loader
[spectrum-image]: https://withspectrum.github.io/badge/badge.svg
[spectrum-url]: https://spectrum.chat/neutrino

---
_Source: https://npm.io/package/neutrino-middleware-style-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
