Skip to content

Publish an ESM compliant client package #5579

@alexrecital

Description

@alexrecital

WARNING: portions of the repro code provided in this request was AI generated. The request below was itself 100% human typed and unvalidated by AI. Enjoy my typos :)

Is your feature request related to a problem? Please describe.

Yes, I am attempting to use the graphql-ruby-client package with the newly released Vite 8 and getting this error Uncaught TypeError: ActionCableLink is not a constructor when running Vite.

I've created the simplest repro I could at https://github.com/alexrecital/repro-graphql-ruby-vite/tree/main which has a readme with repro steps.

I believe that it should be possible to package both CJS and ESM for backward compatibility.

Describe the solution you'd like

This package to start being published as an ESM module so that Vite can work out of the box without having to configure inconsistentCjsInterop.

Describe alternatives you've considered

Npm patch the package, fork the package, vendor the package, open a PR :)

Additional context

https://vite.dev/guide/migration#consistent-commonjs-interop

Thank you for providing open source software.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions