query
query copied to clipboard
Add type:module property to package.json
If the "--experimental-vm-modules" property is set, modules are processed with an error.
Adding the property type: "module" solves this problem.
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 6bd8159068b0c85cc3d5b35d518fb3af576656ee:
Sandbox | Source |
---|---|
@tanstack/query-example-react-basic | Configuration |
@tanstack/query-example-react-basic-typescript | Configuration |
I do not think that adding type: module
is a good idea.
I think we should rather switch exports
statements so default
points to cjs
and import
points to esm
.
Also this PR https://github.com/TanStack/query/pull/3892 should add proper .mjs
extension which should fix this particular problem.