wallet-core/node_modules/json-loader
2017-08-14 05:02:09 +02:00
..
.npmignore node_modules 2017-08-14 05:02:09 +02:00
CHANGELOG.md node_modules 2017-08-14 05:02:09 +02:00
index.js node_modules 2017-08-14 05:02:09 +02:00
LICENSE node_modules 2017-08-14 05:02:09 +02:00
package.json node_modules 2017-08-14 05:02:09 +02:00
README.md node_modules 2017-08-14 05:02:09 +02:00

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');
const json = require('./file.json');

webpack.config.js

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

Maintainer


Tobias Koppers