diff --git a/doc/api/esm.md b/doc/api/esm.md index 9a6bb62fab110a..57db302c307d7b 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -667,7 +667,10 @@ CommonJS and ES module instances of the package: ```js // ./node_modules/pkg/index.mjs - export state from './state.cjs'; + import state from './state.cjs'; + export { + state + }; ``` Even if `pkg` is used via both `require` and `import` in an application (for