feat(modules): Add wxt.hook alias for wxt.hooks.hook

This commit is contained in:
Aaron
2024-08-29 07:12:07 -05:00
parent 8771676e69
commit c5f78d0c8d
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -40,6 +40,7 @@ export async function registerWxt(
wxt = {
config,
hooks,
hook: hooks.hook.bind(hooks),
get logger() {
return config.logger;
},
+4
View File
@@ -1129,6 +1129,10 @@ export interface WxtHooks {
export interface Wxt {
config: ResolvedConfig;
hooks: Hookable<WxtHooks>;
/**
* Alias for `wxt.hooks.hook(...)`.
*/
hook: Hookable<WxtHooks>['hook'];
/**
* Alias for config.logger
*/