export default function (opts = {}) {
  const isJsonFile = opts.filter || /\.json$/;
  return (override, transform) => {
    transform("readSource", function (source, [module]) {
      if (isJsonFile.test(module.path)) {
        source = `module.exports = ${source};`;
      }
      return source;
    });
  };
}

export default function (opts = {}) {
  const isJsonFile = opts.filter || /\.json$/;
  return (override, transform) => {
    transform("readSource", function (module) {
      if (isJsonFile.test(module.path)) {
        module = Object.assign({}, module, {
          rawSource: `module.exports = ${module.rawSource};`
        });
      }
      return module;
    });
  };
}

Bring `readSource` transform up-to-date with Interlock API.
Bring `readSource` transform up-to-date with Interlock API.
