Skip to content

cicero-core: Add browser-compatible bundle #880

@Shubh-Raj

Description

@Shubh-Raj

Summary

cicero-core's TemplateSaver.toArchive() and TemplateLoader.fromArchive() depend on Node.js fs, making them unusable in browser environments.

This came up in accordproject/template-playground#562, where we need to import/export .cta archives client-side but can't use the existing cicero-core API.

Notes

TemplateSaver.toArchive() and TemplateLoader.fromArchive() already use JSZip internally and operate on buffers, not the filesystem directly. The browser incompatibility likely comes from transitive Node.js imports (path, fs from fromDirectory() and the filesystem-based loaders) being pulled into the bundle.

A potential fix could be adding a "browser" field in package.json to exclude Node-only modules, or providing a separate browser entry point that only exposes the archive-compatible methods.

Expected

A browser-compatible bundle/entry point for cicero-core's archive create/extract functionality, so downstream browser apps don't need to reimplement the ZIP logic with JSZip directly.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions