question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transforms with symlinks in node_modules?

See original GitHub issue

I’ve recently started to attempt to use the symlink trick https://github.com/substack/browserify-handbook#symlink to get rid of those pesky …/…/.

To do this I added a symlink in my node_modules folder to a common module using something like this:

cd node_modules && ln -nsf ../app/common/js common

In my app I can now do:

var common = require('common');

and all is well.

However, if any of those files contain something to be transformed (I’m using reactify and envify) – then it does not apply the transform to those files.

Is there some additional option I need to be passing to explicitly tell it to run transforms on those modules?

This is using browserify: 6.3.2

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scamdencommented, Nov 20, 2014

@pselden it’s not pretty but running your transform with {global : true} worked for me

0reactions
scamdencommented, Nov 21, 2014

agree!

On 21 November 2014 11:04, Jesse Tane notifications@github.com wrote:

Cool, aliasify looks like a nicer workaround than the duplicitous package.json files, though I do wish browserify handled this natively!

— Reply to this email directly or view it on GitHub https://github.com/substack/node-browserify/issues/993#issuecomment-64021076 .

Sterling Camden Software Engineer 502 Emerson Street | Palo Alto, CA 94301 303.520.2968 | sterling@relateiq.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

import statements improperly transformed when using symlinks
Describe the bug if a module is referenced via symlink in the node_modules, imports referencing that module by name are transformed to ...
Read more >
Browserify - transform in package.json on symlinked modules ...
In app/node_modules I have modules installed via npm install and local modules symlinked via npm link . The local modules have browserify ...
Read more >
Symlinked `node_modules` structure - PNPM
pnpm's node_modules layout uses symbolic links to create a nested structure of dependencies. Every file of every package inside node_modules is a hard...
Read more >
Resolve | webpack
/abc/node_modules may resolve in /node_modules too. ... Whether to resolve symlinks to their symlinked location. When enabled, symlinked resources are ...
Read more >
node_modules folders should be "excluded" by default
Open it in WebStorm · Run npm install (and wait for it to finish) (Note that this will add many node_modules folders, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found