Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When specified, symlinks are preserved when resolving modules. Specifically, the `realpath` call is skipped. This allows symlinked peer dependencies to work correctly. Matches the behavior of the option added in node v6.3.0: https://nodejs.org/api/cli.html#cli_preserve_symlinks.
- Loading branch information
1 parent
21af338
commit 201708b
Showing
8 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var browserify = require('../'); | ||
var vm = require('vm'); | ||
var test = require('tap').test; | ||
|
||
test('optionally preserves symlinks', function (t) { | ||
t.plan(2); | ||
|
||
var b = browserify(__dirname + '/preserve_symlinks/a/index.js', {preserveSymlinks: true}); | ||
b.bundle(function (err, buf) { | ||
t.ok(!err); | ||
t.ok(buf); | ||
var src = buf.toString('utf8'); | ||
vm.runInNewContext(src, {}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('b'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('c'); |