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

Update to use fully resolved paths for babel plugins #209

Merged
merged 1 commit into from
Feb 17, 2018

Conversation

jaridmargolin
Copy link
Contributor

Babel will resolve plugins relative to the cwd (this may be a slight simplification). This usually works as expected, however, I have stumbled on an edge case when using a monorepo structure with abstracted build configuration.

/packages
  /shared-build
    /node_modules
      + react-svg-loader
      + babel-plugin-syntax-jsx
      + babel-plugin-transform-object-rest-spread
  /app
    /node_modules
      + shared-build // symlink

In this case, babel is unable to resolve the plugins which live within the node_modules directory of the symlinked package, shared-build.

While slightly more verbose, we can bypass this problem by utilizing the full paths to the plugins that are installed relative to this package.

@jaridmargolin
Copy link
Contributor Author

Tests passed locally.

Quickly reading trace on the failing CI, and the error doesn't appear tied to this particular PR.

@boopathi boopathi merged commit 3171aa3 into boopathi:master Feb 17, 2018
@jaridmargolin
Copy link
Contributor Author

Appreciate the quick merge 🙌
Would be hugely helpful if you could publish the updates as well.

Thank you!

@jaridmargolin jaridmargolin deleted the resolve-babel-deps branch February 17, 2018 19:02
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.

2 participants