# json-loader

> json loader module for webpack

Latest version **0.5.7** (published 2017-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install json-loader
pnpm add json-loader
yarn add json-loader
bun add json-loader
```

## 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.5.7 |
| Published | 2017-07-22 |
| First published | 2012-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 430 |
| Author | Tobias Koppers @sokra |
| Maintainers | ericclemmons, d3viant0ne, bebraw, jhnns, thelarkinn, sokra, jtangelder |

## Links

- npm: https://www.npmjs.com/package/json-loader
- Repository: https://github.com/webpack/json-loader
- Homepage: https://github.com/webpack/json-loader#readme
- Issues: https://github.com/webpack/json-loader/issues
- npm.io page: https://npm.io/package/json-loader

## Recent versions

- 0.5.7 (latest) — 2017-07-22
- 0.5.6 — 2017-07-22
- 0.5.5 — 2017-07-22
- 0.5.4 — 2015-11-23
- 0.5.3 — 2015-09-16
- 0.5.2 — 2015-05-24
- 0.5.1 — 2014-05-22
- 0.5.0 — 2013-02-01
- 0.2.0 — 2012-09-25
- 0.1.8 — 2012-08-03
- 0.1.7 — 2012-08-03
- 0.1.6 — 2012-05-20
- 0.1.5 — 2012-04-04
- 0.1.4 — 2012-04-03
- 0.1.3 — 2012-04-03
- … 3 more at https://npm.io/package/json-loader/versions

## README

[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![tests][tests]][tests-url]
[![coverage][cover]][cover-url]
[![chat][chat]][chat-url]

<div align="center">
  <img width="160" height="180"
    src="https://worldvectorlogo.com/logos/json.svg">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200"
      src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
  <h1>JSON Loader</h1>
</div>

<h2 align="center">Install</h2>

```bash
npm install --save-dev json-loader
```

> ⚠️ **Since `webpack >= v2.0.0`, importing of JSON files will work by default. You might still want to use this if you use a custom file extension. See the [v1.0.0 -> v2.0.0 Migration Guide](https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore) for more information**

<h2 align="center">Usage</h2>

### `Inline`

```js
const json = require('json-loader!./file.json');
```

### `Configuration` (recommended)

```js
const json = require('./file.json');
```

**webpack.config.js**
```js
module.exports = {
  module: {
    loaders: [
      {
        test: /\.json$/,
        loader: 'json-loader'
      }
    ]
  }
}
```

<h2 align="center">Maintainer</h2>

<table>
  <tbody>
    <tr>
      <td align="center">
        <img width="150" height="150" src="https://avatars.githubusercontent.com/sokra?v=3">
        </br>
        <a href="https://github.com/sokra">Tobias Koppers</a>
      </td>
    </tr>
  </tbody>
</table>


[npm]: https://img.shields.io/npm/v/json-loader.svg
[npm-url]: https://npmjs.com/package/json-loader

[node]: https://img.shields.io/node/v/json-loader.svg
[node-url]: https://nodejs.org

[deps]: https://david-dm.org/webpack/json-loader.svg
[deps-url]: https://david-dm.org/webpack/json-loader

[tests]: http://img.shields.io/travis/webpack/json-loader.svg
[tests-url]: https://travis-ci.org/webpack/json-loader

[cover]: https://coveralls.io/repos/github/webpack/json-loader/badge.svg
[cover-url]: https://coveralls.io/github/webpack/json-loader

[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack

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