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

Version 5 still has transform hook return dependencies #46

Closed
Conduitry opened this issue Dec 31, 2018 · 1 comment
Closed

Version 5 still has transform hook return dependencies #46

Conduitry opened this issue Dec 31, 2018 · 1 comment

Comments

@Conduitry
Copy link
Member

Version 5, intended as the 'Rollup 1.0' version, still has dependencies return from the transform hook.

This was code written by me, to allow preprocessors to return additional watch dependencies. The API selected for the preprocessors was based on the old Rollup API for the transform hook, but probably it makes the most sense to still have dependencies be an array returned by the preprocessor?

this.addWatchFile is not mentioned in the Rollup changelog as far as I can see, but it looks like it is not present in 0.60.0, which is what's listed as a peer dependency of this plugin. So, despite rollup-plugin-svelte@5 being intended as the rollup@1 update, it should probably be considered breaking to assume this.addWatchFile is present.

So I think we can instead then just look for the truthiness of this.addWatchFile, call that if it's present, and otherwise put dependencies on the object returned by transform.

Sorry this issue description is so much longer than it needs to be.

@Rich-Harris
Copy link
Member

thanks, released 5.0.1

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