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

Feature: Allow users to specify hook for when plugin is ran #132

Closed
rschristian opened this issue Nov 1, 2024 · 3 comments · Fixed by #133
Closed

Feature: Allow users to specify hook for when plugin is ran #132

rschristian opened this issue Nov 1, 2024 · 3 comments · Fixed by #133
Labels
enhancement New feature or request PR welcome

Comments

@rschristian
Copy link
Contributor

Is there any interest in allowing users to configure when the plugin is ran? While this plugin certainly does some things differently, rollup-plugin-copy has a similar option to set the hook which would be nice to have.

Unfortunately I need this plugin to run earlier, during generateBundle, so I've taken to patching this line across a couple dozen or so projects:

async writeBundle() {

Happy to keep patching if need be, but thought I'd ask.

@sapphi-red
Copy link
Owner

May I ask a bit more in detail why you need to run this plugin during generateBundle?

@rschristian
Copy link
Contributor Author

Some other plugins need that content to be transformed and written to the disk by the time they run, and, as far as I know, there's no way to guarantee that besides moving this plugin forward a stage. Moving an FS operation forward, to my knowledge, wouldn't cause any issues either (besides potential name collisions/overwrites I suppose) which is why it seemed like the better target for a patch.

@sapphi-red
Copy link
Owner

I see. I'm open to add this feature. PR welcome 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants