Skip to content
This repository was archived by the owner on Aug 20, 2018. It is now read-only.

webpack-contrib/json-loader

Repository files navigation

npmnodedepstestscoveragechat

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

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

Configuration (recommended)

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

webpack.config.js

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

Maintainer


Tobias Koppers

About

json loader module for webpack - UNMAINTAINED

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 15