Skip to content

Commit 7200723

Browse files
authored
docs: update dual-build information within README (#4472)
1 parent aae95e6 commit 7200723

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,11 @@ tool is built with GraphQL.js!
131131
Building a project using GraphQL.js with [webpack](https://webpack.js.org) or
132132
[rollup](https://github.com/rollup/rollup) should just work and only include
133133
the portions of the library you use. This works because GraphQL.js is distributed
134-
with both CommonJS (`require()`) and ESModule (`import`) files. Ensure that any
135-
custom build configurations look for `.mjs` files!
134+
with both CommonJS (`require()`) and ESModule (`import`) files. The `exports`
135+
map within the project `package.json` should direct runtimes and bundlers to
136+
the appropriate files. Tools that do not support `exports` will find the CommonJS
137+
and ESModule builds side by side, with the CommonJS code packaged
138+
in files with the `.js` extension and the ESModule build within `.mjs` files.
136139

137140
## Contributing
138141

0 commit comments

Comments
 (0)