diff --git a/.changeset/thirty-weeks-teach.md b/.changeset/thirty-weeks-teach.md new file mode 100644 index 0000000..0bf3a8c --- /dev/null +++ b/.changeset/thirty-weeks-teach.md @@ -0,0 +1,6 @@ +--- +"objection-graphql-resolver": patch +"orchid-graphql": patch +--- + +Add proper `exports` section to `package.json`. Allow native ESM import of this module. diff --git a/packages/objection/package.json b/packages/objection/package.json index c9bec74..bde0c76 100644 --- a/packages/objection/package.json +++ b/packages/objection/package.json @@ -9,10 +9,15 @@ "author": "Ilya Semenov", "license": "MIT", "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, "main": "dist/index.cjs", - "module": "dist/index.js", "types": "dist/index.d.ts", - "source": "src/index.ts", "files": [ "dist", "src" diff --git a/packages/orchid/package.json b/packages/orchid/package.json index ddcef0b..eafc7ca 100644 --- a/packages/orchid/package.json +++ b/packages/orchid/package.json @@ -9,10 +9,15 @@ "author": "Ilya Semenov", "license": "MIT", "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, "main": "dist/index.cjs", - "module": "dist/index.js", "types": "dist/index.d.ts", - "source": "src/index.ts", "files": [ "dist", "src"