Skip to content

chore: feature flag build system for Mini #409

@ng

Description

@ng

Context

Add build-time feature flag so Mini code is excluded from standard pod builds.

Implementation

  • Environment variable: ENABLE_MINI=true
  • Conditional dynamic imports for Mini services, routes, and PubNub client
  • When disabled: zero additional dependencies bundled, no PubNub SDK, no Mini routes
  • CI matrix produces two TARs: sleepypod-core.tar.gz and sleepypod-core-mini.tar.gz

Files affected

  • next.config.ts — conditional webpack alias or define
  • src/server/routers/index.ts — conditional Mini router merge
  • src/services/mini/ — entire directory tree-shaken when disabled
  • package.json — PubNub SDK as optional dependency
  • CI workflow — matrix build with/without ENABLE_MINI

Parent

Epic: #405

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions