Skip to content
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

Symlink support for packager #9009

Closed
wants to merge 10 commits into from
10 changes: 5 additions & 5 deletions local-cli/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ const formatBanner = require('./formatBanner');
const path = require('path');
const runServer = require('./runServer');
const findSymlinksPaths = require('./findSymlinksPaths');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it appears you're requiring the symlink resolver but you're not actually using it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But on the other hand there is no way to know if you're using symlinks or not.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is - you might actually want to call findSymlinkPaths to... you know... find the symlink paths and perhaps append them where they belong, no? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say I want to return an array of resolved symlink paths from this function and apply them wherever it'll be needed.

const NODE_MODULES = path.resolve(__dirname, '..', '..', '..');

/**
* Starts the React Native Packager Server.
*/
function server(argv, config, args) {
// Disabled temporarily to fix trunk
// args.projectRoots = args.projectRoots.concat(
// args.root,
// findSymlinksPaths(path.resolve(process.cwd(), 'node_modules'))
// );
args.projectRoots = args.projectRoots.concat(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests started failing with this change

args.root,
findSymlinksPaths(NODE_MODULES)
);

console.log(formatBanner(
'Running packager on port ' + args.port + '.\n\n' +
Expand Down