text: import { createFilter, dataToEsm } from 'rollup-pluginutils';
  
  function json (options) {
  	if ( options === void 0 ) options = {};
  
  	var filter = createFilter(options.include, options.exclude);
  	var indent = 'indent' in options ? options.indent : '\t';
  
  	return {
  		name: 'json',
  
  		transform: function transform (json, id) {
  			if (id.slice(-5) !== '.json') { return null; }
  			if (!filter(id)) { return null; }
  
  			var data = JSON.parse(json);
  			if (Object.prototype.toString.call(data) !== '[object Object]') {
  				return {code: ("export default " + json + ";\n"), map: {mappings: ''}};
  			}
  
  			return {
  				code: dataToEsm(data, {
  					preferConst: options.preferConst,
  					compact: options.compact,
  					namedExports: options.namedExports,
  					indent: indent
  				}),
  				map: {mappings: ''}
  			};
  		}
  	};
  }
  
  export default json;
  //# sourceMappingURL=rollup-plugin-json.es.js.map
  