query icon indicating copy to clipboard operation
query copied to clipboard

Add type:module property to package.json

Open ArtyCodingart opened this issue 1 year ago • 2 comments

If the "--experimental-vm-modules" property is set, modules are processed with an error.

image

Adding the property type: "module" solves this problem.

ArtyCodingart avatar Aug 03 '22 18:08 ArtyCodingart

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

codesandbox-ci[bot] avatar Aug 03 '22 18:08 codesandbox-ci[bot]

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.

DamianOsipiuk avatar Aug 09 '22 21:08 DamianOsipiuk