Skip to content

Proposal: Add ESM-compatible plugin exports for modern environments #614

Open

Description

@matteod

Hi and thanks for this collection of plugins.

Would you consider supporting ES Module (ESM) usage in modern environments like Vite, Symfony AssetMapper, or import maps?

I’d suggest a non-breaking addition:

  • Keep current files unchanged
  • Add ESM-friendly variants (e.g. ellipsis.esm.js) using export default
  • Add "exports" in package.json to expose them to ESM-aware CDNs (esm.sh, skypack, etc.)

If you agree, I can contribute a PR with initial support.

Thanks!

Activity

  1. AllanJard commented on May 16, 2025

    @AllanJard
    Contributor

    I've started doing that for anything that is new or gets updated - e.g. orderNumbers.

    What I'd like is to use that structure for all of the plug-ins - i.e. make use of the DataTables build system (examples and build), and also provide an individual npm package for each plug-in, rather than one large one where you need to know the paths to include.

    If you are willing to look into doing that, it would be most welcome. Otherwise I'll do it while I update them and gradually build them up. ellipsis might be a good place to start.

  2. matteod commented on May 16, 2025

    @matteod
    Author

    Ok It's seems really a good approach. I'll try to find the time to analyze better the structure suggested and hopefully submit a PR. Otherways I'll be waiting ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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