Skip to content

Commit

Permalink
fix: remove ESM (#304)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
reconbot authored Jul 28, 2022
1 parent 577e93f commit 3419163
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 3419163

Please sign in to comment.