Skip to content

Commit 3419163

Browse files
authored
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
1 parent 577e93f commit 3419163

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"types": "./dist/index.d.ts",
66
"main": "./dist/index.js",
77
"exports": {
8-
"import": "./dist/index-esm.mjs",
98
"require": "./dist/index.js",
109
"default": "./dist/index.js"
1110
},

rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
}),
99
],
1010
output: [
11-
{ format: 'esm', file: './dist/index-esm.mjs' },
11+
// { format: 'esm', file: './dist/index-esm.mjs' },
1212
{ format: 'cjs', file: './dist/index.js' },
1313
],
1414
external: [

0 commit comments

Comments
 (0)