Skip to content

Commit c398755

Browse files
authored
Fix importing CommonJS modules from ESM (#20)
1 parent 19b09aa commit c398755

File tree

1 file changed

+1
-1
lines changed
  • guide/02-single-file-package/classic-commonjs

1 file changed

+1
-1
lines changed

guide/02-single-file-package/classic-commonjs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Or, a ESM consumer can load this package like this:
5858

5959
```js
6060
// app.mjs
61-
const { Logger } = require('my-logger');
61+
import { Logger } from 'my-logger';
6262
const logger = new Logger('debug');
6363
logger.error('This is an error message');
6464
```

0 commit comments

Comments
 (0)