Skip to content

Commit 4b88ef3

Browse files
authored
Fix import syntax to work with Deno (#1473)
This was tested with the 0.10.0 version of the package from NPM, but with index.json instead of data.json. The previous syntax didn't work because these aren't named exports.
1 parent ad92b15 commit 4b88ef3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/web-features/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ import { features, groups, snapshots } from "web-features";
1515
Or, without Node.js:
1616

1717
```js
18-
import {
19-
features,
20-
groups,
21-
snapshots,
22-
} from "web-features/data.json" with { type: "json" };
18+
import data from "web-features/data.json" with { type: "json" };
19+
const { features, groups, snapshots } = data;
2320
```
2421

2522
## Rendering Baseline statuses with `web-features`

0 commit comments

Comments
 (0)