-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Using transform on node_module #53
Comments
I am having the same issue. |
I was having this issue as well, and since Google results for "browserify babel node_modules" comes to this issue, and lots of other issues link here, I'm updating it with details on the other solution (using a global transform), which seems to work better than trying to ask every single modern module I require to add something to their package.json. After figuring this out through other means, I see it's actually in the FAQ for babelify, so I'm quoting that section here:
browserify().transform("babelify", {
global: true,
ignore: /\/node_modules\/(?!app\/)/
});
In my use, I find the |
I'm requiring some node modules that are written in es6. I have been searching for a way to do this since browserify does not run transforms on modules from the node_modules folder by design.
The options I have seen are to add a browserify attribute the to modules package.json, which seems like a bad idea since it is not a module I have created. The other option I found was to use transform({global: true}, babelify), but I get a compile error if I do this "ReferenceError: Unknown option: global while parsing file: /Users/...". Would greatly appreciate any guidance in figuring out how to do this.
The text was updated successfully, but these errors were encountered: