웹팩 공식 샵 을 방문하여 의류를 구매하시고 웹팩을 후원해주세요!   모든 후원의 진행사항은 웹팩의 오픈 챌린지 페이지 에서 확인하실 수 있습니다.

ag-grid is proud to partner with webpack

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

##

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