npm install --save json-loader
var json = require("json!./file.json");
// => returns file.json content as json parsed object
Don't forget to polyfill require
if you want to use it in node.
See webpack
documentation.
fork of json loader module for webpack that only emits json (not a module)
npm install --save json-loader
var json = require("json!./file.json");
// => returns file.json content as json parsed object
Don't forget to polyfill require
if you want to use it in node.
See webpack
documentation.
fork of json loader module for webpack that only emits json (not a module)