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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions