From 341916311cac9013a36064115379a9a47f00b8f4 Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Wed, 27 Jul 2022 23:43:13 -0400 Subject: [PATCH] fix: remove ESM (#304) 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 these 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 to work around buggy esm/commonjs interop --- 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: [