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

Set cwd to the location of the closest package.json #282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hughsk
Copy link

@hughsk hughsk commented Jan 14, 2019

This ensures that packages within node_modules that use babelify will resolve babel plugins and presets relative to their own package.json file, instead of resolving plugins and presets from the project root.

This is more consistent with the expected behaviour of browserify transforms, which should work in a dependency without any configuration required by the end user. Previously, developers would have to install all plugins/presets used by babelify within their dependency tree.

Note that this is a breaking change — will likely require a major version bump.

Thanks! ✨

This ensures that packages within node_modules that use babelify
will resolve babel plugins and presets relative to their own
package.json file, instead of resolving plugins and presets from
the project root.

This is more consistent with the expected behaviour of browserify
transforms, which should work in a dependency without any
configuration required the end user.

Previously, developers would have to install all plugins/presets
used by babelify within their dependency tree.

Note that this is a breaking change and will require a major
version bump.
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

Successfully merging this pull request may close these issues.

None yet

1 participant