def commonjs_module?
      data.to_s.include?("module.exports") || data.present? && data.to_s.match(/(require\(.*\)|import)/) && dependencies.length > 0
    end
def commonjs_module?
      data.to_s.include?("module.exports") || data.present? && data.to_s.match(/(require\(.*\)|import)/) && dependencies.length > 0
    end
Is this a commonjs module?

 Be here as strict as possible, so that non-commonjs files are not
 preprocessed.