Skip to content

Barrel file not using custom directories #5133

Description

@Xstoudi

Package version

7.3.2

Describe the bug

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

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions