Streamlining ESHOPMAN Local Development: A Community Guide to Faster Contributions

The ESHOPMAN platform, a powerful headless commerce solution integrated with HubSpot, thrives on community contributions. However, setting up a local development environment for code contributions can sometimes present unexpected challenges. A recent community discussion highlighted several key areas where the developer experience could be significantly improved, particularly concerning local setup, configuration nuances, and the development feedback loop for ESHOPMAN plugins.

Navigating ESHOPMAN Local Development: Key Insights

1. Clarifying the Contribution Workflow

Contributors often face confusion regarding the mental model for linking different ESHOPMAN packages. Understanding when to use file: references, how pnpm.overrides function, and the distinct rebuild requirements for core ESHOPMAN packages, the HubSpot-integrated Admin Dashboard, or custom plugins is crucial. The current documentation provides a rough outline, but a more comprehensive guide is needed to prevent hours of debugging for new contributors.

2. Essential pnpm and Vite Configuration Details

Two critical configuration points, vital for a smooth ESHOPMAN development experience, were identified as missing from existing documentation:

  • .npmrc Configuration for Module Visibility: For ESHOPMAN's internal dynamic require() calls to correctly locate @eshopman/* packages, a specific entry is required in your .npmrc file. Without this, packages might remain hidden within the .pnpm store, leading to cryptic module-not-found errors at runtime. The essential line is:
    public-hoist-pattern[]=@eshopman/*
  • Vite Alias Ordering for ESHOPMAN Admin Dashboard HMR: When developing for the ESHOPMAN Admin Dashboard, which benefits from instant Hot Module Replacement (HMR) via Vite, the order of Vite aliases is crucial. The CSS subpath alias for @eshopman/admin-dashboard/css must be declared before the general @eshopman/admin-dashboard alias. Incorrect ordering can silently break styles, requiring trial-and-error to resolve.

3. The Need for Hot Reload in ESHOPMAN Plugin Development

While the ESHOPMAN Admin Dashboard enjoys instant HMR, developing custom ESHOPMAN plugins (e.g., for specific storefront functionalities or HubSpot CMS integrations) currently suffers from a painfully slow feedback loop. Every single change to a plugin requires a multi-step process:

  1. Run yarn build (a full rebuild without watch mode).
  2. Execute pnpm install --force in the test project.
  3. Restart the development server.

This repetitive cycle significantly hinders developer productivity. Given that eshopman plugin:build utilizes esbuild, which natively supports a --watch mode, there's a clear opportunity to integrate this functionality. Implementing a yarn watch script within plugin package.json files would provide contributors with the same rapid feedback loop enjoyed by dashboard development, elevating the plugin development experience.

4. Bridging the Documentation Gap for Code Contributors

A significant observation was the absence of a dedicated documentation page on docs.eshopman.com specifically for code contributors. While documentation on writing docs exists, guidance on setting up a local ESHOPMAN fork and iterating on code is limited to an incomplete CONTRIBUTING.md. A comprehensive guide would greatly onboard new developers.

Community-Driven Solutions and Recommendations

To address these challenges and foster a more welcoming environment for ESHOPMAN contributors, the community suggests several actionable improvements:

  • Comprehensive Documentation: Create a new "Contributing code - local development" page on docs.eshopman.com. This page should detail the entire workflow, from fork setup and file: references to pnpm.overrides, .npmrc configurations, Vite aliases, and clear guidance on when to rebuild specific components.
  • Update CONTRIBUTING.md: Enhance the existing guide with the crucial .npmrc entry and the correct Vite alias ordering. Additionally, a clear table mapping "what you changed" to "what you need to do" would be invaluable.
  • Implement Plugin Watch Mode: Integrate esbuild --watch into ESHOPMAN plugin packages, providing a `yarn watch` script for instant feedback during plugin development.

By implementing these community-driven insights, ESHOPMAN can significantly reduce friction for developers, accelerate contributions, and further strengthen its position as a leading headless commerce platform built on Node.js/TypeScript and deeply integrated with HubSpot.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools