We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现状如下。
const { build } = require('@umijs/mako'); await build({ hooks: {}, ... });
调用 @umijs/mako 的方式是这样,基于 hooks 可以通过 js 的方式扩展 mako 内部能力。但缺点是,没有一个官方的 js 层插件编写方式。所以,决定把 hooks 变更为 plugins,plugins = hooks[]。这样,对于用户来说,就可以组织 mako-plugin-foo。
plugins = hooks[]
module.exports = { name: 'foo', load() {}, };
然后这样使用。
const { build } = require('@umijs/mako'); await build({ plugins: [ require('mako-plugin-foo'), ], ... });
同时上层框架(Smallfish & Bigfish)可以允许其在插件里增删 Mako 插件。
注:在 https://github.com/umijs/toy-rolldown/issues/3 解之后,binding 部分代码会重构,先用简单方案。
1、在 binding 层支持多插件的形式 2、修改上层调用,hooks > plugins 3、修改 api.md
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
问题
现状如下。
调用 @umijs/mako 的方式是这样,基于 hooks 可以通过 js 的方式扩展 mako 内部能力。但缺点是,没有一个官方的 js 层插件编写方式。所以,决定把 hooks 变更为 plugins,
plugins = hooks[]
。这样,对于用户来说,就可以组织 mako-plugin-foo。然后这样使用。
同时上层框架(Smallfish & Bigfish)可以允许其在插件里增删 Mako 插件。
方案
1、在 binding 层支持多插件的形式
2、修改上层调用,hooks > plugins
3、修改 api.md
The text was updated successfully, but these errors were encountered: