function generateExports (folders) {
  const exports = {
    '.': './index.js'
  }

  for (const folder of folders) {
    if (folder === 'animate') {
      exports[ './animate/animate-list.common' ] = {
        types: './animate/animate-list.d.ts',
        import: './animate/animate-list.mjs',
        require: './animate/animate-list.common.js'
      }
    }
    else {
      const exportDefinition = extensionList.reduce((acc, { prop, ext }) => {
        const filePath = path.join(baseFolder, folder, `index${ ext }`)
        if (fs.existsSync(filePath)) {
          acc[ prop ] = `./${ folder }/index${ ext }`
        }
        return acc
      }, {})

      if (Object.keys(exportDefinition).length) {
        exports[ `./${ folder }` ] = exportDefinition
      }
    }
  }

  exports[ './*' ] = './*'

  return exports
}
Generates the exports object for the package.json file.
@param {string[]} folders - List of folder names.
@returns {object} - Exports configuration.