npm install --save-dev json-loader
Usageâ ï¸ 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
Inline
const json = require('json-loader!./file.json');
Configuration
(recommended)
const json = require('./file.json');
webpack.config.js
Maintainer Readme Keywordsnone Package Sidebar Install Downloads Weekly Downloadsmodule.exports = {
  module: {
    loaders: [
      {
        test: /\.json$/,
        loader: 'json-loader'
      }
    ]
  }
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4