-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update initialize_bouncer_middleware.stub #13
Conversation
Hey, thanks for the PR, but I think you are just missing this provider in your providers: [
// ... others providers
() => import('@adonisjs/core/providers/edge_provider'),
], |
So we should add that to configure command? |
Oh wait sorry. Indeed a fix is needed, because maybe you are not using Edge. And so, |
If you are not using edge You just delete that line from the created middleware. There is no need to modify the stub. |
So this should be explicit in the docs, right? So that we don't have this same issue in the future. |
Yeah, we can update the docs to mention to remove this line if you are not using Edge. |
What about conditionally add this line in the middleware only if |
If we do that, people will install |
i was thinking about that : if Edge is not installed, we add the middleware with commented code. that way, if people need to install edge afterward, they can simply uncomment the code /**
* Uncomment if you need Edge helpers
*/
// if ('view' in ctx) {
// ctx.view.share(ctx.bouncer.edgeHelpers)
// } Having to manually update the bouncer middleware seems a bit boring. But it's not the end of the world either |
I think, we are trying to serve individuals who do not want to understand the surrounding ecosystem of the framework. They will always struggle to use the framework.
But you ignore the docs, do not understand the error in the first place and start with an issue, then its a problem with you and not with anything else. Also, I do not want to make these configure commands complicated like in v5 and then create a mess for ourselves in order to maintain them. |
π Linked issue
β Type of change
π Description
There is a typescript build problem in this code. I don't know if this is the best way to do it, but it is resolves the problem.
π Checklist