Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES module support for @apollo/client/utilities #9008

Closed
tobiasdiez opened this issue Nov 5, 2021 · 3 comments
Closed

ES module support for @apollo/client/utilities #9008

tobiasdiez opened this issue Nov 5, 2021 · 3 comments

Comments

@tobiasdiez
Copy link

Intended outcome:
Loading @apollo/client/utilities using esbuild / in a esm context works

Actual outcome:
The import import { relayStylePagination } from '@apollo/client/utilities/policies/pagination' for example leads to

node:7012) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
D:\Programming\JabRefOnline\node_modules\@apollo\client\utilities\globals\maybe.js:1
export function maybe(thunk) {
^^^^^^

SyntaxError: Unexpected token 'export'

How to reproduce the issue:

Versions

The envinfo command failed with an EWORKSPACESCONFIG error, but I'm using the latest version of apollo client: "@apollo/client@^3.4.16"

@rosskevin
Copy link
Contributor

May be related to #9697

@alessbell
Copy link
Member

Closing as a duplicate of apollographql/apollo-feature-requests#287.

@alessbell alessbell closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants