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

plugin init or reset hook #1611

Closed
akvadrako opened this issue Sep 5, 2017 · 1 comment
Closed

plugin init or reset hook #1611

akvadrako opened this issue Sep 5, 2017 · 1 comment

Comments

@akvadrako
Copy link

Some rollup plugins keep state that needs to be reset after each run. For example, CSS extractors will collect styles on each call to transform() and dump a merged CSS file beside bundle.js on the final call to onwrite(). I'm writing one now for stylis.

When running rollup watch, I cannot find a reliable and documented way to detect when a new run starts. It would be nice if a plugin.init/reset() hook was added.

@guybedford
Copy link
Contributor

A buildStart and buildEnd hook have now been added in #2208.

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

No branches or pull requests

2 participants