[AdonisJS V7] Configurable import path for transformers entities generation #5047
tom-brulin
started this conversation in
Ideas
Replies: 1 comment
-
|
Hello @tom-brulin Feel free to send a PR for the same 👍🏽 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am currently trying out Adonis V7, and I am figuring out a problem with my code base structure when generating entities.
I don't use the common code base structure provided with adonis, instead I do module base architecture, for example in my app folder I will have these folders: core, auth, roles, etc.
That means that my inertia middleware is located under
app/core/middleware/inertia_middleware.tsaccesible with#core/middleware/inertia_middleware.The problem is that break the generated shared props for inertia because the inertia middleware import inside
.adonisjs/client/data.d.tsis importing inertia middleware with#middleware/inertia_middleware, and this is not customizable for now.What I suggest is to add an option in the
indexEntitiesfunction under transformers config, to customize this import path.I Implemented an example of the feature in this repo: https://github.com/tom-brulin/adonis_core_v7_index_entities_inertia_middleware
Beta Was this translation helpful? Give feedback.
All reactions