@dutchiesdk/ecommerce-extensions-sdk

中文文档
0.50.0发布于 2026/11/03MITTypeScriptESM + CJS零依赖近 30 天下载 5876

npm

原始使用文档
文档目录7 节
  1. Requirements
  2. Installation
  3. Quick Start
  4. Full Documentation
  5. Changelog
  6. Support
  7. License

@dutchiesdk/ecommerce-extensions-sdk

npm

React SDK for building custom storefront extensions on the Dutchie Ecommerce Pro platform. It provides the useDataBridge() hook and supporting types/components that give your extension components typed access to dispensary data, cart state, user info, navigation actions, and async data loaders.

Alpha Release — This SDK is currently in alpha and subject to breaking changes.

Requirements

  • Node.js >= 18.0.0
  • React ^17.0.0 or ^18.0.0 / react-dom ^17.0.0 or ^18.0.0
  • react-shadow ^20.5.0
  • A Dutchie-provided development environment — the SDK alone isn't sufficient to build/deploy extensions. Contact [email protected] to request agency partner access.

Installation

npm install @dutchiesdk/ecommerce-extensions-sdk
# or
pnpm add @dutchiesdk/ecommerce-extensions-sdk

Quick Start

import React from "react";
import {
  useDataBridge,
  RemoteBoundaryComponent,
  DataBridgeVersion,
} from "@dutchiesdk/ecommerce-extensions-sdk";

const MyExtension: RemoteBoundaryComponent = () => {
  const { dataLoaders, actions, location, user, cart } = useDataBridge();

  return (
    <div>
      <h1>Welcome to {location?.name}</h1>
      <p>Cart items: {cart?.items.length || 0}</p>
    </div>
  );
};

MyExtension.DataBridgeVersion = DataBridgeVersion;

export default MyExtension;

Full Documentation

The complete guide — architecture, the Data Bridge, full API reference (hooks, components, context, types), data interface (actions, data loaders, data types), extension development guides, custom product cards, meta/SEO, event handlers, best practices, and examples — lives at:

👉 docs.dutchie.com/dutchie-core-docs/dutchie-ecommerce-pro-sdk

Also see the @dutchiesdk/ecommerce-sdk-cli package for the dev server, theme generator, and an MCP server that gives AI coding assistants direct search access to these docs.

Changelog

Release notes are published automatically to the Changelog page in the docs.

Support

License

MIT — Made with 💚 by Dutchie

版本与发布记录

@dutchiesdk/ecommerce-extensions-sdk 共发布 63 个版本,首次发布于 2025/06/13;过去 12 个月发布了 41 个版本。

版本发布日期距今
0.50.0latest2026/11/0310 天前
0.49.02026/10/2816 天前
0.48.02026/10/2717 天前
0.47.02026/10/2420 天前
0.44.02026/09/301 个月前
0.43.02026/09/231 个月前

关于 @dutchiesdk/ecommerce-extensions-sdk 的常见问题

如何安装 @dutchiesdk/ecommerce-extensions-sdk?

在项目目录运行 npm install @dutchiesdk/ecommerce-extensions-sdk,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^17.0.0 || ^18.0.0)、react-dom(^17.0.0 || ^18.0.0)、react-shadow(^20.5.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dutchiesdk/ecommerce-extensions-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dutchiesdk/ecommerce-extensions-sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@dutchiesdk/ecommerce-extensions-sdk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dutchiesdk/ecommerce-extensions-sdk 可以商用吗?

@dutchiesdk/ecommerce-extensions-sdk 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dutchiesdk/ecommerce-extensions-sdk 的下载量有多少?

根据 npm 官方下载统计,@dutchiesdk/ecommerce-extensions-sdk 在 2026/10/13 – 2026/11/11 这 30 天内被下载 5,876 次,日均约 196 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dutchiesdk/ecommerce-extensions-sdk 还在维护吗?

最新版本 0.50.0 发布于 2026/11/03(10 天前);至今共发布 63 个版本,其中过去 12 个月发布了 41 个;首次发布于 2025/06/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。