Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>RCompilerNew to Visual Studio Code? Get it now.
RCompiler

RCompiler

fls-vscode-compiler

| (0) | Free
Right-click compilation for web2 projects - compile views folders with incremental or force mode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RCompiler

VSCode extension for compiling web2 project pages with right-click context menu

Features

  • Right-click compilation: Compile any folder under views/ with a single click
  • Two compilation modes:
    • Incremental: Compile only modified pages (faster, for development)
    • Force: Compile all pages (complete rebuild, for production)
  • Configurable paths: Support different project structures via VSCode settings
  • Real-time feedback: Progress indicator and detailed compilation logs
  • Output channel: View compilation output in dedicated "RCompiler" panel

Installation

From Marketplace (coming soon)

  1. Open VSCode Extensions panel (Ctrl+Shift+X)
  2. Search for "RCompiler"
  3. Click Install

From VSIX

  1. Download the latest .vsix file from [Releases]
  2. In VSCode, press F1 and select "Extensions: Install from VSIX..."
  3. Select the downloaded file

From Source

# Clone the repository
git clone https://github.com/yourusername/RCompiler.git
cd RCompiler

# Install dependencies
npm install

# Build
npm run compile

# Install in VSCode
# Press F5 in VSCode to open Extension Development Host

Configuration

RCompiler uses VSCode settings. Open settings (Ctrl+,) and search for "RCompiler":

Setting Default Description
rcompiler.compileScript scripts/compile.ts Path to compile script (relative to workspace root)
rcompiler.compileWorkingDirectory "" Working directory for compilation (empty = workspace root)
rcompiler.compileTimeout 300 Compilation timeout in seconds (10-3600)

Example Configuration

For a custom project structure:

{
  "rcompiler.compileScript": "tools/build/compile.js",
  "rcompiler.compileWorkingDirectory": "frontend",
  "rcompiler.compileTimeout": 600
}

Usage

Basic Workflow

  1. Open your web2 project in VSCode
  2. In the Explorer, find a folder under views/ (e.g., views/Home/)
  3. Right-click the folder
  4. Select compilation mode from "RCompiler" menu:
    • 增量编译(仅修改页面) - Incremental compile
    • 强制编译(全部页面) - Force compile
  5. View progress in status bar and output in "RCompiler" panel

Viewing Output

To view compilation details:

  • Open Output Channel: Press Ctrl+Shift+U and select "RCompiler"
  • From Error Notification: Click "Open Output" button in error messages

Requirements

  • VSCode: version 1.74.0 or higher
  • Node.js: For running the compile script (tsx/ts-node)
  • Project: web2 project with compile.ts script

Troubleshooting

"Compile script not found"

Cause: The configured script path doesn't exist in your workspace.

Solution:

  1. Open VSCode settings (Ctrl+,)
  2. Search for "rcompiler.compileScript"
  3. Update the path to match your project structure

"No workspace folder found"

Cause: No folder is open in VSCode.

Solution: Open your project folder in VSCode (File → Open Folder).

Compilation timeout

Cause: Compilation takes longer than configured timeout.

Solution:

  1. Open VSCode settings (Ctrl+,)
  2. Search for "rcompiler.compileTimeout"
  3. Increase the timeout value (in seconds)

FAQ

Q: Can I compile multiple folders at once? A: Currently, RCompiler compiles one folder at a time. The compile script determines which pages are included.

Q: Does this work with file symbols (remote workspaces)? A: Yes, as long as the compile script is accessible via the file system.

Q: Can I customize the compilation arguments? A: Currently, RCompiler passes --prod and optionally --force to the compile script. Custom args may be added in future versions.

Changelog

See CHANGELOG.md for version history.

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

  • Issues: GitHub Issues
  • Discussions: GitHub Discussions

Screenshots

Right-click Menu

Right-click menu

Progress Indicator

Progress indicator

Output Channel

Output channel

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft