json-loader
json loader module for webpack
Last updated 2 years ago by d3viant0ne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install json-loader 
SYNC missed versions from official npm registry.

npm node deps tests coverage chat

JSON Loader

Install

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 for more information

Usage

Inline

const json = require('json-loader!./file.json');

Configuration (recommended)

const json = require('./file.json');

webpack.config.js

module.exports = {
  module: {
    loaders: [
      {
        test: /\.json$/,
        loader: 'json-loader'
      }
    ]
  }
}

Maintainer


Tobias Koppers

Current Tags

  • 0.5.7                                ...           latest (2 years ago)

18 Versions

  • 0.5.7                                ...           2 years ago
  • 0.5.6                                ...           2 years ago
  • 0.5.5                                ...           2 years ago
  • 0.5.4                                ...           4 years ago
  • 0.5.3                                ...           4 years ago
  • 0.5.2                                ...           5 years ago
  • 0.5.1                                ...           6 years ago
  • 0.5.0                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.8                                ...           7 years ago
  • 0.1.7                                ...           7 years ago
  • 0.1.6                                ...           8 years ago
  • 0.1.5                                ...           8 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           8 years ago
  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Downloads
Today 137
This Week 24,744
This Month 71,798
Last Day 8,366
Last Week 45,212
Last Month 194,100
Dependencies (0)
None
Dev Dependencies (1)
Dependents (2388)

Copyright 2014 - 2016 © taobao.org |