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

Fix some issues with deactivating the plugin with Meteor #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gsabran
Copy link

@gsabran gsabran commented Jun 23, 2016

The patch 1.1.0 deactivates the plugin when Meteor is running. In some context (for instance with webpack:webpack), the plugin is still needed so we have to do a more subtle fix.

gsabran referenced this pull request Jun 23, 2016
When running this babel-plugin inside Meteor, it gives us
weird errors.
But, we don't  need this to use inside Meteor.
Meteor do this for us automatically.
So, we simply turn off this when using inside Meteor.
// Here's we detect the use of Meteor that interferes with path resolution
// global.meteorBabelHelpers is something we can see when
// running inside Meteor.
if (global.meteorBabelHelpers && path.startsWith(this.root)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to remove path.startsWith(this.root) to make this work.
Make sure to do meteor reset and before using this.
(and call npm run compile in this repo)

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