Skip to content

Commit 32df541

Browse files
committed
docs: add esm import example to readme
1 parent d6e3f70 commit 32df541

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ This plugin was made to make it easier to build declarations without running two
1616
```js
1717
const { dtsPlugin } = require("esbuild-plugin-d.ts");
1818
const { build } = require("esbuild");
19+
// OR
20+
import { dtsPlugin } from "esbuild-plugin-d.ts";
21+
import { build } from "esbuild";
1922

2023
build({
2124
entryPoints: ["./test/index.ts"],
@@ -38,9 +41,6 @@ Be aware that if you delete your dist folder and have incremental mode enabled,
3841
This plugin has experimental declaration bundling support, to enable it, set `experimentalBundling` to true in the plugin's options as follows:
3942

4043
```js
41-
const { dtsPlugin } = require("esbuild-plugin-d.ts");
42-
const { build } = require("esbuild");
43-
4444
build({
4545
entryPoints: ["./test/index.ts"],
4646
outdir: "./dist",

0 commit comments

Comments
 (0)