Skip to content
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

Hooks #414

Closed
aklinker1 opened this issue Feb 3, 2024 · 1 comment · Fixed by #419
Closed

Hooks #414

aklinker1 opened this issue Feb 3, 2024 · 1 comment · Fixed by #419
Labels

Comments

@aklinker1
Copy link
Collaborator

aklinker1 commented Feb 3, 2024

Feature Request

Add build hooks that can be overridden per project. Will use hookable for this.

Hooks will be setup per-project, in the wxt.config.ts file:

export default defineConfig({
  hooks: {
    async ready() {
      // ...
    },
  },
})

List of hooks to add: See #419

Here's Nuxt's list of hooks: https://github.com/nuxt/nuxt/blob/21d6dcef5dab6ca803c0ed73b1339c0abf430e2e/packages/schema/src/types/hooks.ts#L64

In the future, I'll consider making a plugin module system like Nuxt that can add additional hooks and make them reusable, but I want to still support one-off hook overrides int he config file regardless, so this won't get in the way. Starting small.

Is your feature request related to a bug?

#405

What are the alternatives?

N/A.

Additional context

Add any other context or screenshots about the feature request here.

@aklinker1 aklinker1 changed the title Build hooks Hooks Feb 3, 2024
This was referenced Feb 4, 2024
@aklinker1
Copy link
Collaborator Author

Released in v0.16.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant