async function updatePackageJson (exports) {
  const packageJsonPath = path.join(baseFolder, 'package.json')

  try {
    const packageJson = await fse.readJson(packageJsonPath)
    packageJson.exports = exports
    await fse.writeJson(packageJsonPath, packageJson, { spaces: 2 })
  }
  catch (err) {
    throw new Error(`Error updating package.json: ${ err.message }`)
  }
}
Updates the package.json file with the new exports configuration.
@param {object} exports - Exports configuration.