You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
606 B
13 lines
606 B
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
|
|
var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
|
|
var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
|
|
|
|
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
|
|
console.log(b, ': preserveSymlinks true');
|
|
console.log(c, ': preserveSymlinks false');
|
|
|
|
if (a !== b && a !== c) {
|
|
throw 'sync: no match';
|
|
}
|
|
console.log('sync: success! a matched either b or c\n');
|