-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[RFC] customLoader #3480
Labels
Comments
在哪个生命周期加载? |
didLoad 吧 |
有个问题,需要区分 app/agent 吗,一般都在 app 里面 |
可以区分一下吧,inject 里可以填 app 或者 agent ? |
存不存在这种场景,需要同时 load 到 app 和 agent 上?那这样 inject 是否也可以支持传个数组? |
popomore
added a commit
that referenced
this issue
Feb 21, 2019
inject 只有 app/ctx,如果要支持可以加个 type |
popomore
added a commit
to eggjs/core
that referenced
this issue
Feb 28, 2019
popomore
added a commit
to eggjs/core
that referenced
this issue
Feb 28, 2019
popomore
added a commit
that referenced
this issue
Mar 6, 2019
popomore
added a commit
that referenced
this issue
Mar 7, 2019
great work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
背景
Egg 支持自定义 loader,通过 app.loader 的 API 可以自定义加载某个目录的文件到 app 或 ctx。
但是通过 API 调用比较麻烦
思路
在
config.default.js
增加 customLoader 的配置,不需要再使用 APIegg-ts-helper 也可以读这个配置来生成 typing
在 didLoad 加载自定义 loader
跟进
The text was updated successfully, but these errors were encountered: