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

provide build end hook #706

Closed
4 tasks done
userquin opened this issue Jun 3, 2022 · 0 comments · Fixed by #709
Closed
4 tasks done

provide build end hook #706

userquin opened this issue Jun 3, 2022 · 0 comments · Fixed by #709
Labels
build Related to the build system enhancement New feature or request

Comments

@userquin
Copy link
Member

userquin commented Jun 3, 2022

Is your feature request related to a problem? Please describe.

There are situations where information about the build process is required before vitepress finish, which cannot be done from a Vite plugin. For example, adding a PWA including the generated pages in the service worker manifest.

The current problem is that we have to include scripts after the vitepress build so that it loads the PWA plugin manually and regenerates the PWA on the distribution folder and it is a very repetitive arduous job.

Describe the solution you'd like

Adding a build-end hook providing the Vite config and the routes generated by Vitepress.

For example, using Astro integrations, you can just add a astro:build:done hook, Astro just call this hook once SSG process finish and before finishing the build process (provides some info about the SSG result like routes and urls):

https://docs.astro.build/en/reference/integrations-reference/#quick-api-reference

I can make a PR for the build end hook.

Describe alternatives you've considered

No response

Additional context

No response

Validations

@brc-dd brc-dd added enhancement New feature or request build Related to the build system labels Jun 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Related to the build system enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants