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

[metro-visualizer] Add README and development script #292

Closed
wants to merge 5 commits into from

Conversation

simonpfish
Copy link
Contributor

Summary

A README was added to the metro-visualizer package with an overview of the tool and setup instructions.

Additionally, a simple script that spawns a metro server for testing the visualizer was added to the package.

Note: I just completed the CLA for the first time.

Test plan

Read through the README. Run the development script from the metro-visualizer root folder and point the browser at http://localhost:8080/visualizer to make sure that the server is spawned correctly.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 15, 2018
@codecov-io
Copy link

Codecov Report

Merging #292 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   85.86%   85.86%           
=======================================
  Files         143      143           
  Lines        4534     4534           
  Branches      709      709           
=======================================
  Hits         3893     3893           
  Misses        575      575           
  Partials       66       66

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aba22ad...13152c9. Read the comment docs.

@simonpfish simonpfish changed the title README for metro-visualizer + development script [metro-visualizer] Add README and development script Oct 15, 2018
@rafeca
Copy link
Contributor

rafeca commented Oct 26, 2018

Thanks @simonpfish and sorry for the delay reviewing! I'm gonna import this into phabricator 😃

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

rafeca has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@rtmalone
Copy link

rtmalone commented Feb 13, 2019

Hi, I realize this is still open. but I'm trying to get the visualizer to work and this is the only place I have found with any instructions. I'm stuck at a place where I think I need to see whether a specific package is being included in the bundle. When I follow the instructions here and visit localhost:8081/visualizer I receive

Unable to resolve module `react` from `/Users/my/path/to/project/node_modules/metro- visualizer/src/app/index.js`: Module `react` does not exist in the Haste module map or in these 
directories: /Users/my/path/to/project/node_modules

That's untrue however. React is definitely in my node_modules as it is a dep of every react-native related package.

@simonpfish
Copy link
Contributor Author

Hey! You might have to cd into the metro-visualizer package directory and run npm install or yarn there. Let me know if this fixes anything, I can look more into it if it doesn't.

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

I rebased and I'm gonna land it now.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

thymikee added a commit to thymikee/metro that referenced this pull request Mar 3, 2019
…ation

* upstream/master: (122 commits)
  Bump Metro to v0.53.0
  Improve flow coverage in Metro
  Enable platform transforms for dev too, but keep it safe for MetroResolver
  Use function maps to symbolicate traces
  Move react-native-symbolicate to metro repo
  Migrated Metro from babel-jest to a custom transformer
  React sync for revisions f24a0da...8e25ed2
  Revert D14168466: Perform security fixes
  Adds a missing dependency to metro
  Bumps antd to fix missing peerdeps
  Updates the package.json to match the Yarn output
  Improve prelude code
  Perform security fixes
  metro-buck: setup __DEV__ and other variables on the global object
  Add README and development script (facebook#292)
  Allow custom BABEL_ENV (facebook#364)
  Update siteConfig.js (facebook#327)
  docs: mention lerna in CONTRIBUTING.md (facebook#338)
  Revert D14024934: metro: keep track of significant dependencies ordering
  metro-buck: Hermes: no args to async wrapper if no prefetch
  ...
@roytan883
Copy link

@simonpfish follow the README, can't make it work. check #373
maybe you should write more clear about how to start it, and with which version of RN.
I start it with yarn run metro serve, but can't build bundle, always says "Module AccessibilityInfo does not exist in the Haste module map".
which version of RN can work with metro-visualizer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants