Open tomprince opened 1 year ago
I'm hitting this over and over with postgrest-js trying to use it in different environments. To get my code to work, I have to use all 3 of these in different contexts:
// XXX: ncc wants
import * as postgrest from "@supabase/postgrest-js";
// XXX: esbuild wants:
import postgrest from "@supabase/postgrest-js";
// tsx wants:
import { PostgrestClient } from "@supabase/postgrest-js";
It would be great to be able to use this module without it breaking on import so much.
Bug report
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Expected behavior
I expect the above import to work and import an ESM module.
Screenshots
System information
Additional context
It appears that node only looks at the
main
entrypoint inpackage.json
, and notmodule
. It also specifies a newer and more complex way of specifying see here for details.