# raw-extend-loader

> raw extend loader module for webpack

Latest version **1.0.5** (published 2018-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install raw-extend-loader
pnpm add raw-extend-loader
yarn add raw-extend-loader
bun add raw-extend-loader
```

## 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.5 |
| Published | 2018-01-03 |
| First published | 2017-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kenny Wang @jaywcjlove |
| Maintainers | jslite |

## Links

- npm: https://www.npmjs.com/package/raw-extend-loader
- Repository: https://github.com/react-doc/raw-extend-loader
- Homepage: https://github.com/react-doc/raw-extend-loader#readme
- Issues: https://github.com/react-doc/raw-extend-loader/issues
- npm.io page: https://npm.io/package/raw-extend-loader

## Dependencies (1)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1

## Recent versions

- 1.0.5 (latest) — 2018-01-03
- 1.0.4 — 2018-01-03
- 1.0.3 — 2017-12-23
- 1.0.2 — 2017-12-22
- 1.0.1 — 2017-12-22
- 1.0.0 — 2017-12-22

## README

<div align="center">
  <img width="200" height="200"
    src="https://cdn3.iconfinder.com/data/icons/lexter-flat-colorfull-file-formats/56/raw-256.png">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200"
      src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
  <h1>Raw Extend Loader</h1>
  <p>A loader for webpack that lets you import files as a string,
  <a href="https://github.com/webpack-contrib/raw-loader">raw-loader</a> enhanced.</p>
</div>

<h2 align="center">Install</h2>

```bash
npm install --save-dev raw-extend-loader
```

<h2 align="center">Usage</h2>

Use the loader either via your webpack config, CLI or inline.

### Via webpack config (recommended)

**webpack.config.js**
```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.txt$/,
        use: [
          {
            loader: require.resolve('raw-extend-loader'),
            options: {
              dir: '/path/md', // Copy to the '/path/md' directory.
              filename: 'dir', // "underline | dir"
              sep: '___', // filename="underline", File name to the directory, using '___' interval, default value '__'.
            },
          },
        ],
      }
    ]
  }
}
```

### option

- `dir` Copy to the '/path/md' directory.
- `filename` Optional `underline | dir`, According to the directory to store, or do not create a directory.
- `sep` Set `filename="underline"`, File name to the directory, using `___` interval, default value `__`.

**In your application**
```js
import txt from './file.txt';
```

### CLI

```bash
webpack --module-bind 'txt=raw-extend-loader'
```

**In your application**
```js
import txt from 'file.txt';
```

### Inline

**In your application**
```js
import txt from 'raw-extend-loader!./file.txt';
```

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