Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Relay WatcherNew to Visual Studio Code? Get it now.
Relay Watcher

Relay Watcher

Pinterest

|
1,724 installs
| (0) | Free
Run the relay compiler on save
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Relay Watcher

Visual Studio Marketplace Version Visual Studio Marketplace Installs

Run the relay compiler on save.

By default relay --watch

  • requires watchman to be installed
  • runs as a separate command

Watchman is cumbersome to install and frequently throws errors within docker containers.

Install

Install options:

  • Download from the marketplace
  • Install from the command line: code --install-extension pinterest.relay-watcher
  • Search for Relay Watcher in the VS Code extensions panel

Features

  • Run the relay compiler on save
  • Requires no configuration
  • Supports multiple package managers: npm and yarn
  • Supports VSCode Remote
  • Uses VSCode's internal file watcher instead of watchman.

Requirements

  • relay.config.js file(s) in the workspace root or subdirectories.
  • relay-compiler package should be installed next to each Relay configuration file

Extension Settings

Setting Type (default) Description
relayWatcher.enableTelemetry boolean (true) Enable/disable telemetry
relayWatcher.logLevel enum: 'info', 'debug', 'off' ('info') Output log level
relayWatcher.showOutputOnError boolean (true) Show output log when relay compiler throws an error

Extension Commands

Setting Description
relayWatcher.enable Enable the extension
relayWatcher.disable Disable the extension
relayWatcher.showOutputChannel Show the output channel

Release Notes

See CHANGELOG.md

Publish

Publish a new version:

  1. Update CHANGELOG.md and add a new version
  2. Publish with vsce
npm i -g vsce
vsce publish patch

FAQ

How does the extension work?

  • Activate if there are 1 or multiple relay.config.js file(s) within the workspace.
  • For each of the configuration files:
    • Check if relay-compiler is installed (if not, the configuration file gets ignored)
    • Check which package manager is installed by searching for a yarn.lock
    • Find the src, source directory

Potential Improvements

  • Use relay-config to support relay.config.json and package.json configurations (legacy)

Inspired by

  • VSCode File Watcher
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft