Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#5133·core

Barrel file not using custom `directories`

Author: XstoudiCreated Jul 24, 2026Updated Aug 9, 2026
LabelsType: Enhancement

Package version

7.3.2

Describe the bug

Customizing httpControllers path in the adonisrc.ts file like this:

typescript

export default defineConfig({
  directories: {
    httpControllers: 'src/infrastructure/api/http/controllers',
  },
  ...
})

prevent barrel for being correctly generated unless I also edit the directory path in the indexEntities init hook:

bash
export default defineConfig({
  ...
  hooks: {
      init: [
        indexEntities({
          controllers: { source: 'src/infrastructure/api/http/controllers' },
        }),
      ],
  },
  ...
})

Would be really cool if indexEntities was using custom directories directly.

Reproduction repo

No response

Source: adonisjs/core

View original on GitHubView discussion on GitHub