-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
browserify applies transforms to npm linked modules #1386
Comments
Hmm, I wonder if this could be from #1318. |
Cc/ @chrisirhc |
Maybe related: #1365. |
Definitely sounds like it's related to #1365. Thanks for narrowing it down. If nobody else gets to this, I'll look into it later today. |
Ah thanks for linking me to this issue @jmm! This matches the behavior I'm seeing. The babel transform is being applied to a symlinked node_module when it shouldn't be. |
I've come up with a quick hackish solution to resolve this (browserify/module-deps#99, #1392). It's up for comment and review. |
Is there any workarounds for this issue except hand-patching |
switch to webpack |
I've thought about it for a long time |
Off with your heads! @polkovnikov-ph I'm still working from the assumption that this is a result of #1318. Could you downgrade to |
@chrisirhc Ok, thanks for confirming and for the PR. I haven't had a real good look at either #1318 or the new PR and I hadn't seen you say whether or not it had resulted from #1318, so I wasn't sure. |
This is fixed in 12.0.1. |
@substack See #1437 - I believe this should be reopened. |
I encountered this issue when using browserify 12.0.1. |
If you
npm link
a module into your browserify project, it incorrectly has transforms applied to it. This becomes a major issue particularly if the module you install relies on non-strict mode and you're using babelify, which inserts"use strict"
, causing it to error.Here's a repo to reproduce: https://github.com/jayphelps/browserify-bug. The major step to note in the README is that you must git clone the external module and
npm link
it for the bug to show.Also note that very new versions of babel proactively transform certain strict mode code, like
this.foo
toundefined.foo
. Don't let this confuse you.The text was updated successfully, but these errors were encountered: