From 37f1789885aa9df6f5bfa658a165d2793d99074f Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Wed, 27 Jul 2022 23:41:21 -0400 Subject: [PATCH] fix: remove ESM vitest, vite, and a few other bundlers are having issues with the graphql subpath imports as they're not declared in the graphql export map. This is fine for commonjs but it wreaks havock on esm loaders. I think this is a bug in the commonjs/esm interop but here we are BREAKING CHANGE: This removes the ESM export from the export maps and the shipped files. --- package.json | 1 - rollup.config.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 591952e7..022a9164 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "types": "./dist/index.d.ts", "main": "./dist/index.js", "exports": { - "import": "./dist/index-esm.mjs", "require": "./dist/index.js", "default": "./dist/index.js" }, diff --git a/rollup.config.js b/rollup.config.js index c74b8ac7..5a9a72cf 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -8,7 +8,7 @@ export default { }), ], output: [ - { format: 'esm', file: './dist/index-esm.mjs' }, + // { format: 'esm', file: './dist/index-esm.mjs' }, { format: 'cjs', file: './dist/index.js' }, ], external: [