You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
xzx 2ec7739298 [Version] V.3.8 4 vuotta sitten
..
.npmignore [Version] V.3.8 4 vuotta sitten
CHANGELOG.md [Version] V.3.8 4 vuotta sitten
LICENSE [Version] V.3.8 4 vuotta sitten
README.md [Version] V.3.8 4 vuotta sitten
index.js [Version] V.3.8 4 vuotta sitten
package.json [Version] V.3.8 4 vuotta sitten

README.md

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