module.exports = function (opts={}) {
  var isJsonFile = opts.filter || /\.json$/;

  return function (override, transform, control) {
    transform("readSource", function (source) {
      const asset = this.args[0];
      if (isJsonFile.test(asset.path)) {
        source = `module.exports = ${source};`;
      }
      return source;
    });
  };
};

module.exports = function (opts={}) {
  var isJsonFile = opts.filter || /\.json$/;

  return function (override, transform, control) {
    transform("readSource", function (source, args) {
      const asset = args[0];
      if (isJsonFile.test(asset.path)) {
        source = `module.exports = ${source};`;
      }
      return source;
    });
  };
};

Update transform to accomodate more explicit transform API changes.
Update transform to accomodate more explicit transform API changes.
