diff options
author | 2023-09-14 13:50:21 +1000 | |
---|---|---|
committer | 2023-09-13 20:50:21 -0700 | |
commit | cf834964a674c619b9665f3b30c001eebb544785 (patch) | |
tree | 48275909943a9c78fb03b95257a89b8050080c89 | |
parent | 6ac70a6dd2449da987462f2cdcdf80c770abadaf (diff) | |
download | bun-cf834964a674c619b9665f3b30c001eebb544785.tar.gz bun-cf834964a674c619b9665f3b30c001eebb544785.tar.zst bun-cf834964a674c619b9665f3b30c001eebb544785.zip |
modules documentation didn't have correct import example (#5225)
-rw-r--r-- | docs/runtime/modules.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/runtime/modules.md b/docs/runtime/modules.md index fe8bb8c64..b4d560c81 100644 --- a/docs/runtime/modules.md +++ b/docs/runtime/modules.md @@ -135,9 +135,9 @@ The biggest difference between CommonJS and ES Modules is that CommonJS modules You can `import` any file or package, even `.cjs` files. ```ts -const { foo } = require("./foo"); // extensions are optional -const { bar } = require("./bar.mjs"); -const { baz } = require("./my-typescript.tsx"); +import { foo } from "./foo"; // extensions are optional +import bar from "./bar.ts"; +import { stuff } from "./my-commonjs.cjs"; ``` ### Using `import` and `require()` together |