Skip to content

Comments

build: switch pydance from tsc to esbuild for faster bundling#27

Merged
ram-nadella merged 1 commit intomainfrom
add-bundling-to-extension
Jul 19, 2025
Merged

build: switch pydance from tsc to esbuild for faster bundling#27
ram-nadella merged 1 commit intomainfrom
add-bundling-to-extension

Conversation

@ram-nadella
Copy link
Owner

Summary

  • Replace TypeScript compiler with esbuild for production builds
  • Add bundling to address GitHub Actions warning about extension performance
  • Significantly reduce VSIX package size by excluding node_modules

Changes

  1. Added esbuild as dev dependency for fast bundling
  2. Created esbuild.js configuration that:
    • Bundles all dependencies into a single file
    • Minifies code for production builds (346KB vs 783KB)
    • Excludes VS Code API (marked as external)
    • Generates source maps only for development
  3. Updated package.json scripts to use esbuild:
    • compile: Development build
    • watch: Watch mode for development
    • package: Production build with minification
    • vscode:prepublish: Now runs the production build
  4. Updated .vscodeignore to exclude entire node_modules directory since code is bundled

Test plan

  • Verify npm run compile builds successfully
  • Verify npm run package creates minified production bundle
  • Check bundle size reduction (346KB minified vs 783KB unminified)
  • Test extension functionality with bundled code
  • Verify GitHub Actions build passes without bundling warning

This addresses the warning: "This extension consists of 205 files, out of which 172 are JavaScript files. For performance reasons, you should bundle your extension"

🤖 Generated with Claude Code

- Replace TypeScript compiler with esbuild for production builds
- Add esbuild configuration with watch mode support
- Update .vscodeignore to exclude all node_modules content
- Separate compile and compile:tests scripts to optimize build process
- Reduces VSIX package size and improves extension load times

This addresses the GitHub Actions warning about bundling the extension
for better performance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ram-nadella ram-nadella merged commit 0d2c4ae into main Jul 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant