bloom-layout
Version:
layout components used in bloom packages
86 lines (66 loc) • 2.22 kB
Markdown
[![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>
```js
const json = require('json-loader!./file.json');
```
```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>
[ ]: https://img.shields.io/npm/v/json-loader.svg
[ ]: https://npmjs.com/package/json-loader
[ ]: https://img.shields.io/node/v/json-loader.svg
[ ]: https://nodejs.org
[ ]: https://david-dm.org/webpack/json-loader.svg
[ ]: https://david-dm.org/webpack/json-loader
[ ]: http://img.shields.io/travis/webpack/json-loader.svg
[ ]: https://travis-ci.org/webpack/json-loader
[ ]: https://coveralls.io/repos/github/webpack/json-loader/badge.svg
[ ]: https://coveralls.io/github/webpack/json-loader
[ ]: https://badges.gitter.im/webpack/webpack.svg
[ ]: https://gitter.im/webpack/webpack